-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(wasm): 🤖 reduce WASM binary size (#187)
* chore(wasm): 🤖 binary size improvements * chore: 🤖 add changeset * chore: 🤖 use emmalloc for compact size * chore: 🤖 strip location details from wasm for smaller size * chore: 🤖 add optimize_for_size flag * chore: 🤖 check rust versions on ci * chore: 🤖 emsdk v3.1.57 * chore: 🤖 fix ci * chore: 🤖 update changelog
- Loading branch information
Showing
5 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
default: minor | ||
--- | ||
|
||
# chore(wasm): 🤖 reduce WASM binary size | ||
|
||
- **WASM Binary Optimization:** | ||
|
||
- Applied the `-Oz` flag with `emcc` for size optimization. | ||
- Used the compact `emmalloc` allocator. | ||
- Used the rust nightly toolchain to remove location details and panic string formatting for a smaller binary size. | ||
- Reduced binary size by ~142 KB (from 1,245,102 bytes to 1,099,243 bytes). | ||
|
||
- **JavaScript Glue Optimization:** | ||
|
||
- Enabled the Closure compiler with the `--closure=1` flag. | ||
- Reduced glue code size by ~36.88 KB (from 67,964 bytes to 30,197 bytes). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters