Skip to content

Fix the wasm64 build when SIMD is enabled - #146

Merged
jrraymond merged 1 commit into
petgraph:masterfrom
nickbabcock:wasm64
Nov 8, 2026
Merged

jrraymond merged 1 commit into
petgraph:masterfrom
nickbabcock:wasm64

Conversation

@nickbabcock

Copy link
Copy Markdown
Contributor

The SIMD code uses 32-bit wasm instructions, so a 64-bit wasm (wasm64)
build with SIMD turned on failed to compile. wasm64 now uses the plain
code path. CI checks wasm64 with and without SIMD.

Testing

wasm64 is a tier 3 target, so checking it needs nightly and a standard library built from source:

rustup toolchain install nightly --component rust-src
RUSTFLAGS="-C target-feature=+simd128" cargo +nightly check -Zbuild-std=std,panic_abort --target wasm64-unknown-unknown

Before this change, this fails with "unresolved import core::arch::wasm32"; after it, it builds. wasm32 behaves exactly as before.

The SIMD code uses 32-bit wasm instructions, so a 64-bit wasm (wasm64)
build with SIMD turned on failed to compile. wasm64 now uses the plain
code path. CI checks wasm64 with and without SIMD.
@jrraymond
jrraymond merged commit 5b886fc into petgraph:master Nov 8, 2026
4 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants