Skip to content

fix(lint): build the tsrs_lint library for wasm32-wasip1 - #1123

Merged
maschwenk merged 1 commit into
mainfrom
max/fix-1116-tsrs-lint-wasm
Nov 28, 2026
Merged

maschwenk merged 1 commit into
mainfrom
max/fix-1116-tsrs-lint-wasm

Conversation

@maschwenk

Copy link
Copy Markdown
Collaborator

tsrs_lint listed mimalloc-safe as a regular dependency, but only the tsrs-lint binary uses it as its global allocator. so anything that depends on the library for wasm32-wasip1 also had to build mimalloc's C sources, which don't build there, and cargo check -p tsrs_lint --lib --target wasm32-wasip1 failed in libmimalloc-sys2's build script.

Fixes #1116

mimalloc-safe is now a cfg(not(target_family = "wasm")) dependency, and the binary's #[global_allocator] has the same cfg, so native builds keep mimalloc and Cargo.lock doesn't change. the wasm32-wasip1 compile check in CONTRIBUTING.md and the nightly port script now also checks the tsrs_lint library

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.
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Performance change vs main

Workflow run Β· main 027014a0216e β†’ PR merge 9cfb7a8e83a2 (head dac78f2f0aaa)

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 release binaries are byte-for-byte identical. No compiler performance difference to measure.

tsrs-lint

The main and PR tsrs-lint binaries are byte-for-byte identical. No lint performance difference to measure.

@codspeed

codspeed Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

Warning

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

⚠️ 4 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

βœ… 8 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing max/fix-1116-tsrs-lint-wasm (dac78f2) with main (027014a)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@maschwenk
maschwenk marked this pull request as ready for review November 28, 2026 15:17
@maschwenk
maschwenk added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 8ab51c7 Nov 28, 2026
36 checks passed
@maschwenk
maschwenk deleted the max/fix-1116-tsrs-lint-wasm branch November 28, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

tsrs_lint can't build for wasm32-wasip1: mimalloc-safe is a library dependency but only the binary uses it

1 participant