cad-editor/.cargo/config.toml
Hakan Seven f9e7afdee2 fix(build): scope Windows debug stack
Apply /STACK only to the debug app binary instead of every Windows target artifact.
2026-08-17 22:46:50 +03:00

20 lines
1 KiB
TOML

# 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".
#
# `-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.
[target.wasm32-unknown-unknown]
rustflags = [
'--cfg',
'getrandom_backend="wasm_js"',
'-Cstrip=none',
# The debug UI build has a substantially deeper view-construction stack
# than the optimized bundle. Keep modal construction from exhausting the
# WebAssembly stack while developing with `trunk serve`.
'-Clink-arg=-zstack-size=4194304',
]