The default wasm optimization flag is -Oz, which is a bit slow for development. To speed up, wasm compilation, I set the optimization flag to -O1.
There’s .hcbuild
, on each zome, which has the json for each build command. I created .hcbuild.prod.json
which has the -Oz
flag & .hcbuild.dev.json
which has the -O1
flag.
I then symlink .hcbuild.dev.json
-> .hcbuild
for development builds & .hcbuild.prod.json
-> .hcbuild
for prod builds.