Repository navigation
fix(lint): build the tsrs_lint library for wasm32-wasip1 - #1123
Conversation
mimalloc-safe was an unconditional tsrs_lint dependency, though only the tsrs-lint binary uses it as its global allocator. Its C sources do not build for WebAssembly, so the library failed to compile for wasm32-wasip1. Depend on it only off WebAssembly targets, and check the tsrs_lint library in the wasm32-wasip1 compile check.
Performance change vs mainWorkflow run Β· main Clef gate: Clef estimated 19.1% default and single-threaded wall time, 16.4% peak RSS, 9.3% single-threaded instruction count impact probability. The main and PR tsrs-lintThe main and PR |
Merging this PR will not alter performanceWarning oxc-project has exceeded the Hobby plan limit of 5 active contributors. Upgrade your plan or apply to the open source program by December 8, 2026 to keep using CodSpeed. 1 warning
Comparing Footnotes
|
tsrs_lintlistedmimalloc-safeas a regular dependency, but only thetsrs-lintbinary uses it as its global allocator. so anything that depends on the library forwasm32-wasip1also had to build mimalloc's C sources, which don't build there, andcargo check -p tsrs_lint --lib --target wasm32-wasip1failed inlibmimalloc-sys2's build script.Fixes #1116
mimalloc-safeis now acfg(not(target_family = "wasm"))dependency, and the binary's#[global_allocator]has the same cfg, so native builds keep mimalloc andCargo.lockdoesn't change. the wasm32-wasip1 compile check in CONTRIBUTING.md and the nightly port script now also checks thetsrs_lintlibrary