Skip to content

Commit 4afc4bc

Browse files
authored
Update wasm build command in README.md (#16)
Use build-std to further reduce size. Signed-off-by: Jiahao XU <[email protected]> Signed-off-by: Jiahao XU <[email protected]>
1 parent 39b2779 commit 4afc4bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ Rebuilding the wasm can be done with the commands:
3030

3131
```bash
3232
cd wasm
33-
cargo build --release --target wasm32-unknown-unknown
33+
34+
cargo +nightly build \
35+
--release \
36+
--target wasm32-unknown-unknown \
37+
-Z build-std=std,panic_abort \
38+
-Z build-std-features=panic_immediate_abort
39+
3440
# If wasm-opt is unavailable, copying the file is fine.
3541
wasm-opt target/wasm32-unknown-unknown/release/momo_watt.wasm -Oz \
3642
--strip-debug --simplify-globals --vacuum -o ../src/momo.wasm

0 commit comments

Comments
 (0)