Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Commit

Permalink
feat(wasm) Run wasm-snip again.
Browse files Browse the repository at this point in the history
Since rust-lang/rust#53434, it is possible to
run `wasm-snip` again. The binary size drops from 20kb to 16kb, and
the `.br` file reachs 6.4kb again.
  • Loading branch information
Hywan committed Aug 29, 2018
1 parent e1a4453 commit 6223305
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ build-wasm: check-wasm
cd {{wasm_directory}} && cargo +nightly build --target wasm32-unknown-unknown --release
cp target/wasm32-unknown-unknown/release/gutenberg_post_parser_wasm.wasm {{wasm_directory}}/bin/gutenberg_post_parser.wasm
cd {{wasm_directory}}/bin && \
wasm-gc gutenberg_post_parser.wasm && \
wasm-snip --snip-rust-fmt-code --snip-rust-panicking-code -o gutenberg_post_parser_snipped.wasm gutenberg_post_parser.wasm && \
mv gutenberg_post_parser_snipped.wasm gutenberg_post_parser.wasm && \
wasm-gc gutenberg_post_parser.wasm && \
wasm-opt -g -Oz -o gutenberg_post_parser.debug.wasm gutenberg_post_parser.wasm && \
wasm-opt -Oz -o gutenberg_post_parser_opt.wasm gutenberg_post_parser.wasm && \
Expand Down

0 comments on commit 6223305

Please sign in to comment.