Skip to content

Clean Cargo artifacts between WASM variants - #965

Merged
sebcrozet merged 1 commit into
dimforge:masterfrom
PoseidonEnergy:cargo-clean-between-variant-builds
Aug 7, 2026
Merged

Clean Cargo artifacts between WASM variants#965
sebcrozet merged 1 commit into
dimforge:masterfrom
PoseidonEnergy:cargo-clean-between-variant-builds

Conversation

@PoseidonEnergy

Copy link
Copy Markdown
Contributor

This PR adds a cargo clean step before each wasm-pack build in rapier-compat.

The build variants share the same Cargo target directory but use different RUSTFLAGS, particularly for SIMD and non-SIMD builds. Without cleaning, for me, Cargo reuses artifacts compiled with incompatible target features, causing non-SIMD builds to contain SIMD instructions and fail during wasm-opt validation.

Cleaning before each variant ensures every WASM package is rebuilt with the correct compiler flags.

@sebcrozet
sebcrozet merged commit 1679a2b into dimforge:master Aug 7, 2026
15 of 18 checks passed
@sebcrozet

Copy link
Copy Markdown
Member

Thanks!

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