I'd like to investigate the ability to sprinkle HTML pages with WASM instead of JS.
Sometimes it makes sense to repeat part of calculations in the browser to avoid a round trip to the server. So it would be great to split it into a library and use it on both sides to ensure the calculations are always in sync.
./run.sh
basic
- the simplest example without any dependenciesbasic-bindgen
- the previous example usingwasm_bindgen
greet
- working with strings which aren't native to WASMevents
- interactive greeting usingweb_sys
example | WASM | JS glue |
---|---|---|
basic | 112 B | - |
basic-bindgen | 142 B | 2.5 K |
greet | 9.7 K | 5.5 K |
events | 19 K | 14 K |