When I see how fast is the WASM compiled I wonder if we could not bypass the wasm-bindgen build entirely.
The current process to build is as follow:
- run pre-build
- run
cargo build --target wasm...
- run wasm-bindgen to generate the JS and stuff that wraps the wasm
- run post-build
I believe the really slow stuff is actually in the point 3 with wasm-bindgen. Maybe it is possible to run it once and then re-use the existing JS code and stuff.
This is an idea and it should be explored. It doesn't mean it is true or can be done.