Skip to content

fix: restrict wasm-bindgen to browser wasm, fixing wasip1 builds#7208

Merged
0ax1 merged 1 commit intodevelopfrom
ad/fix-wasi-build
Mar 30, 2026
Merged

fix: restrict wasm-bindgen to browser wasm, fixing wasip1 builds#7208
0ax1 merged 1 commit intodevelopfrom
ad/fix-wasi-build

Conversation

@0ax1
Copy link
Copy Markdown
Contributor

@0ax1 0ax1 commented Mar 30, 2026

wasm-bindgen 0.2.115 changed its cfg guard from
cfg(all(target_arch = "wasm32", target_os = "unknown")) to cfg(target_family = "wasm"), causing __wbindgen_* imports to be emitted for all wasm targets including wasm32-wasip1. Combined with wasm-test/Cargo.lock being untracked (deleted in #6187), CI picked up the new version and the wasmer integration test broke.

Narrow the wasm-bindgen-futures dependency and the wasm runtime module in vortex-io from cfg(target_arch = "wasm32") to cfg(all(target_arch = "wasm32", target_os = "unknown")), which matches only wasm32-unknown-unknown (browser) and excludes WASI targets. For the fuzz crate's wasip1 target, provide a session without an async runtime handle since the fuzz workloads are synchronous.

wasm-bindgen 0.2.115 changed its cfg guard from
`cfg(all(target_arch = "wasm32", target_os = "unknown"))` to
`cfg(target_family = "wasm")`, causing `__wbindgen_*` imports to be
emitted for all wasm targets including wasm32-wasip1. Combined with
wasm-test/Cargo.lock being untracked (deleted in #6187), CI picked up
the new version and the wasmer integration test broke.

Narrow the `wasm-bindgen-futures` dependency and the wasm runtime module
in vortex-io from `cfg(target_arch = "wasm32")` to
`cfg(all(target_arch = "wasm32", target_os = "unknown"))`, which matches
only wasm32-unknown-unknown (browser) and excludes WASI targets. For the
fuzz crate's wasip1 target, provide a session without an async runtime
handle since the fuzz workloads are synchronous.

Signed-off-by: lx <lx@lx.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>
@0ax1 0ax1 marked this pull request as ready for review March 30, 2026 13:59
@0ax1 0ax1 added the changelog/fix A bug fix label Mar 30, 2026
@0ax1 0ax1 requested a review from robert3005 March 30, 2026 13:59
@AdamGS
Copy link
Copy Markdown
Contributor

AdamGS commented Mar 30, 2026

🚢

@0ax1 0ax1 enabled auto-merge (squash) March 30, 2026 14:00
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 30, 2026

Merging this PR will degrade performance by 15.51%

❌ 2 regressed benchmarks
✅ 1104 untouched benchmarks
⏩ 1522 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation bitwise_not_vortex_buffer_mut[128] 317.8 ns 376.1 ns -15.51%
Simulation bitwise_not_vortex_buffer_mut[1024] 477.2 ns 535.6 ns -10.89%

Comparing ad/fix-wasi-build (175de98) with develop (2258dd3)

Open in CodSpeed

Footnotes

  1. 1522 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.

@0ax1 0ax1 merged commit a545239 into develop Mar 30, 2026
61 of 63 checks passed
@0ax1 0ax1 deleted the ad/fix-wasi-build branch March 30, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants