Repository navigation
perf(wasm): reduce browser transfer size and verify package identity - #2732
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 8683411 | Commit Preview URL Branch Preview URL |
Oct 15 2026, 02:50 PM |
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.
What changed
Reduce first-visit browser package transfer size with a dedicated size/throughput-balanced Rust profile. Keep the full command set, jq, Terminal, and resource policies. Ship source/tool/profile identity and a verifiable WASM hash in
build-info.json.CI and npm publication now gate the same 24-case GNU Bash sample, raw/gzip/Brotli budgets, package integration suite, and npm archive contract. Add bounded browser/runtime measurement scripts and retained raw evidence.
Why
The brush-web studies found a large published/source compatibility gap and network-dominated mobile startup. npm 0.18.2 identifies the September 22 release, while the study's source is 269 commits newer. Rebuilding the exact release reproduces npm's identical five failures in our sample; this is unreleased interpreter work, not a divergent published feature configuration.
Before / After
Same current source, Rust 1.95.0, bindgen 0.2.128, Terminal enabled, Binaryen 125. Original opt-3/thin-LTO versus selected opt-s/fat-LTO:
Published npm and rebuilt v0.18.2 both pass 19/24 with identical five failures. These 24 cases are a bounded regression sample, not a rerun of the study's three large-corpus percentages.
Methodology, raw samples, attribution, and runtime tradeoff. Timings are exploratory on a development host; byte and semantic gates are deterministic. This page measures the package without brush-web's framework/renderer/worker overhead.
Validation:
just pre-pr; strict all-feature Clippy;just test(HTTP/default + serialized failpoints); 70 browser package tests; 24-case compatibility; compressed-size gate; 165 script tests; actual npm-pack/extract/execute smoke.Post-merge verification: merged
c34c6f0da08f6319b4d060cf1fc078564d5c1914has the identical tree to the tested head. A clean rebuild at that exact commit passes all 70 package tests, 24/24 GNU Bash cases, and size budgets. Its WASM SHA-256 exactly matches the measured selected artifact. All 43 PR checks passed. npm remains 0.18.2 at567511386572d4c4b9f649ab1da97aad53b9f341;just check-nightlystill blocks release.Risk
just check-nightlycurrently fails the release contract: Advisory Audit in one of the last three nightly runs is red. npm still serves 0.18.2; merged code is distinct from published-artifact proof.Checklist