Skip to content

fix(release): exclude rayon on wasm32 so the WASM build links — restores release binaries (#142)#167

Open
avrabe wants to merge 1 commit into
mainfrom
fix/142-wasm-release-build
Open

fix(release): exclude rayon on wasm32 so the WASM build links — restores release binaries (#142)#167
avrabe wants to merge 1 commit into
mainfrom
fix/142-wasm-release-build

Conversation

@avrabe

@avrabe avrabe commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Root cause of the missing release binaries (#142)

Not a lost upload step — a failing WASM build. Every release v1.1.5–v1.1.10 shipped zero assets because:

  • Build WASM (wasm32-wasip2) fails at link, and
  • Create Release has needs: [build-native, build-wasm], so it's skipped — the native binaries that built fine never get uploaded.

The WASM link error:

rust-lld: undefined symbol: __wasi_init_tp / pthread_create / pthread_detach
error: could not compile `loom-cli`

Source: loom-core depends on rayon (islands.rs — the opt-in #71 island-model parallel pass-ordering). rayon's thread pool needs pthread, absent on the single-threaded wasm32-wasip2 target; the threaded startup also drags in __wasi_init_tp.

Fix

  • rayon[target.'cfg(not(target_arch = "wasm32"))'.dependencies].
  • islands.rs: sequential fallback on wasm (iter() vs par_iter()).
  • The island tie-break is deterministic across interleavings (test_islands_deterministic_tiebreak, test_islands_baseline_matches_serial), so sequential ≡ parallel — behavior frozen.

Verified

  • loom-core compiles for wasm32-wasip2 (rayon excluded, islands wasm path valid).
  • Native islands tests 6/6 green (the par_iter path is byte-identical to before).
  • ⚠️ The full release WASM link (z3 built via wasi-sdk in CI) + asset upload can only be confirmed by a release run — do not merge until a workflow_dispatch dry-run or the next release shows build-wasm green + assets uploaded.

Scope

This is the primary #142 fix (binaries shipping at all). The secondary unified-artifact-standard rewrite is PR #143 (chore/standardize-release-yml) — orthogonal to this loom-core change; both are needed.

Refs #142.

🤖 Generated with Claude Code

…#142)

Root cause of the missing release binaries: every release v1.1.5–v1.1.10
shipped zero assets NOT because the upload step was lost, but because the
`Build WASM (wasm32-wasip2)` job FAILS, and `Create Release`
(needs: [build-native, build-wasm]) is skipped as a result — so the
native binaries that built fine are never uploaded either.

The WASM build fails at link:
  rust-lld: undefined symbol: __wasi_init_tp / pthread_create / pthread_detach
  error: could not compile `loom-cli`

Source: loom-core depends on `rayon` (islands.rs, the opt-in #71
island-model parallel pass-ordering). rayon's thread pool needs pthread,
which the single-threaded wasm32-wasip2 target can't provide; the threaded
startup also drags in __wasi_init_tp.

Fix: make rayon a `cfg(not(target_arch = "wasm32"))` dependency and give
islands.rs a sequential fallback on wasm (`iter()` instead of
`par_iter()`). The island tie-break is deterministic across interleavings
(test_islands_deterministic_tiebreak / _baseline_matches_serial), so the
sequential result is bit-identical to the parallel one — behavior frozen.

Verified: loom-core compiles for wasm32-wasip2 (--no-default-features,
rayon excluded, islands wasm path valid); native islands tests 6/6 green
(par_iter path unchanged). The full release WASM link (z3 built via
wasi-sdk in CI) + asset upload is confirmed by the next release run.

Refs #142. (Secondary unified-artifact-standard work tracked in PR #143.)
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.

1 participant