[–] neoneye2 4y ago ↗ In 2021, I made my first WASM experiment, an editor for LODA. You can try it here: https://loda-lang.org/edit/?oeis=2487Getting the Rust code to output wasm was easy. Getting the wasm run in a separate web worker was difficult.The outputted wasm file is around 1mb. I'm not sure if the outputted wasm file can be compacted. This is the script I use for generating the wasm file. Any ideas? https://github.com/loda-lang/loda-rust/blob/develop/rust_pro... [–] singron 4y ago ↗ I'm not sure what flags wasm-pack uses, but you can try using opt-level=s for smaller codegen. Also lto can help.You can take a look at cargo-bloat. It's sometimes surprising what code takes up all the space.There are some general tips here: https://github.com/johnthagen/min-sized-rust [–] neoneye2 4y ago ↗ "surprising what code takes up the space".Lol, indeed, I will try out your excellent suggestions.
[–] singron 4y ago ↗ I'm not sure what flags wasm-pack uses, but you can try using opt-level=s for smaller codegen. Also lto can help.You can take a look at cargo-bloat. It's sometimes surprising what code takes up all the space.There are some general tips here: https://github.com/johnthagen/min-sized-rust [–] neoneye2 4y ago ↗ "surprising what code takes up the space".Lol, indeed, I will try out your excellent suggestions.
[–] neoneye2 4y ago ↗ "surprising what code takes up the space".Lol, indeed, I will try out your excellent suggestions.
[–] empalms 4y ago ↗ I read something a while back about AutoCAD using WASM.Found this site after a quick google search but it doesn’t appear to be actively maintained : https://madewithwebassembly.com
5 comments
[ 0.46 ms ] story [ 25.5 ms ] threadGetting the Rust code to output wasm was easy. Getting the wasm run in a separate web worker was difficult.
The outputted wasm file is around 1mb. I'm not sure if the outputted wasm file can be compacted. This is the script I use for generating the wasm file. Any ideas? https://github.com/loda-lang/loda-rust/blob/develop/rust_pro...
You can take a look at cargo-bloat. It's sometimes surprising what code takes up all the space.
There are some general tips here: https://github.com/johnthagen/min-sized-rust
Lol, indeed, I will try out your excellent suggestions.
Found this site after a quick google search but it doesn’t appear to be actively maintained : https://madewithwebassembly.com