mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
Web: size-optimised wasm profile (27.0 → 18.1 MB); bump to 0.3.1 (#109)
The 0.3.0 web release failed packaging/web/package.sh's 24 MiB gate: the wasm grew from 22.2 MB (0.2.0) to 27.0 MB once the plugin sandbox (wasmi + wasmparser, #101) and the collaboration crates (#103-#105) joined the browser build, which still used the desktop `release` profile (opt-level 3, thin LTO, 4 codegen units). - Cargo.toml: new `web-release` profile (inherits release; opt-level "s", fat LTO, one codegen unit, no debug info, stripped). opt-level "z" measured 16.9 MB; "s" keeps render speed. - apps/figcraft-web/index.html: build with that profile, and pass the wasm features rustc emits (bulk memory etc.) to wasm-opt, which otherwise rejects the size-optimised module. - Version 0.3.0 -> 0.3.1. docs/releasing.md: the web profile and size history. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a2bf43927f
commit
f9b1b7fb15
@@ -150,6 +150,13 @@ tar -xzf figcraft-<v>-freebsd-x86_64.tar.gz --strip-components 1 -C /usr/local
|
||||
with sample `_headers`/`.htaccess` and the hosting guide. The app uses WebGPU with a WebGL2
|
||||
fallback; `?webgl` forces WebGL2. 0.1.0: wasm 17.7 MiB raw, 6.7 MiB gzip, 4.4 MiB Brotli.
|
||||
|
||||
The wasm is built with the size-optimised `web-release` Cargo profile (`opt-level = "s"`, fat
|
||||
LTO, one codegen unit; `data-cargo-profile` in `apps/figcraft-web/index.html`) and then
|
||||
`wasm-opt -Oz`, which needs the wasm features rustc emits by default passed explicitly
|
||||
(`data-wasm-opt-params`). Sizes: 0.2.0 21.1 MiB and 0.3.0 25.8 MiB (failed the gate; the plugin
|
||||
interpreter and collaboration code landed) with the desktop `release` profile; 0.3.1 17.2 MiB
|
||||
with `web-release`. The desktop builds keep `release`.
|
||||
|
||||
## Secrets
|
||||
|
||||
All signing secrets are **`release`-environment secrets** (deployment branches: `release` only),
|
||||
|
||||
Reference in New Issue
Block a user