JS build optimization#177
Merged
Merged
Conversation
- Move [profile.release] to workspace root (was silently ignored in js/) - opt-level z, LTO, codegen-units=1, panic=abort, strip - Gate console_error_panic_hook behind its feature flag (off by default in release) - Add wasm-opt -Oz pass via wasm-pack metadata
Javascript size report
✅ Size decreased -12.5%. |
26ee719 to
150f479
Compare
150f479 to
2d12990
Compare
Remove the tag-only guard from build_npm so the npm artifact is built on every push and PR (the publish step still gates on v* tags). Add wasm_size job (PR-only) that downloads the build_npm artifact for the HEAD measurement, builds the base branch from source for the baseline, posts a sticky markdown comment with the size table, and fails if the .wasm grows by more than 5%.
2d12990 to
a5ed33d
Compare
This was referenced Jun 24, 2026
Draft
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Actually try to optimize the Javascript build sizes (config needs to be in the root workspace
Cargo.toml), and add an actions step that compares the built NPM packages sizes and fails if they get too big (5% larger).Works on #135 #12
This is part 1 of 6 in a stack made with GitButler: