2026-06-25 14:11:18 +03:00
|
|
|
# getrandom 0.3 (pulled by ahash via acadrust) needs this cfg to select its
|
|
|
|
|
# browser backend on wasm32-unknown-unknown, alongside its `wasm_js` feature
|
|
|
|
|
# (enabled in Cargo.toml for the wasm target). Without it the web build fails
|
|
|
|
|
# with "wasm32-unknown-unknown targets are not supported by default".
|
2026-07-10 09:36:43 +03:00
|
|
|
#
|
|
|
|
|
# `-Cstrip=none` overrides the release profile's `strip = true` for the wasm
|
|
|
|
|
# target only: stripping removes the `target_features` custom section, so
|
|
|
|
|
# `wasm-opt` can no longer see that `bulk-memory` is enabled and rejects the
|
|
|
|
|
# module's memory.fill/copy ops ("require bulk memory"). Native release binaries
|
|
|
|
|
# stay stripped; only the wasm keeps its feature section.
|
2026-06-25 14:11:18 +03:00
|
|
|
[target.wasm32-unknown-unknown]
|
2026-07-10 09:36:43 +03:00
|
|
|
rustflags = ['--cfg', 'getrandom_backend="wasm_js"', '-Cstrip=none']
|