Edit and instrument already compiled Wasm binaries
cargo install wasm-edit
Change the initial memory amount (in pages):
wasm-edit edit-memory --initial-memory=1000 < input.wasm > output.wasm
Some Wasm binaries have very recursive flow of control, increase the maximum stack size:
$ ulimit -s 160000