cubing / twsearch

🔍 Twizzle Search — a program to find algs and scrambles for twisty puzzles
GNU General Public License v3.0
24 stars 8 forks source link

Decrease WASM build size #37

Open lgarron opened 8 months ago

lgarron commented 8 months ago

The current size (1.4MB) comes from a few things.

Potentially useful command:

rustup component add rust-src --toolchain nightly
cargo install cargo-bloat

cargo +nightly bloat --release -Z build-std --target aarch64-apple-darwin -n 1000

Also:

lgarron commented 8 months ago

This is now significantly better. It was down to ≈240KiB, but is back up to ≈310KiB due to big cube definitions.

I was to change the WASM build to get the KPuzzleDefinition JSON from JS instead of embedding it, which should allow us to get back down in size.