How to speed up wasm build times for faster development iteration? #3654
-
I'm new to both wgpu and targeting wasm, so I may simply lack some basic tricks. I have started with a basic variation of the hello-triangle example and building my project with I'm wondering what are the general recommendations for fast development iteration cycles for wgpu + wasm? Is it e.g. possible to turn off wasm-opt, or is there a kind of "fast optimization" profile? If so, will it only impact the wasm size, or is the optimization actually need for runtime performance as well? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Personally I don't have any experience with Without |
Beta Was this translation helpful? Give feedback.
-
You can change both of these at once by running Also, if you want to disable |
Beta Was this translation helpful? Give feedback.
wasm-pack
defaults to a release build (optimized byrustc
, likecargo build --release
) in addition to runningwasm-opt
.You can change both of these at once by running
wasm-pack build --dev --target web
. It will use the cargodev
profile and will not runwasm-opt
.Also, if you want to disable
wasm-opt
even for releases, you can configure it using yourCargo.toml
.