forked from 1b-agent/opencadstudio-upstream
iced_test renders headless through wgpu by default. Several test threads opening GPU devices at once crashed the driver: about every other parallel `cargo test --lib` run died with SIGSEGV, always with the color picker, ribbon, overlay and dock UI tests running together. With ICED_TEST_BACKEND=tiny-skia the suite passes run after run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.6 KiB
TOML
42 lines
1.6 KiB
TOML
# getrandom 0.3 (pulled by ahash via opencadcodec) 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',
|
|
]
|
|
|
|
[target.x86_64-pc-windows-gnu]
|
|
rustflags = [
|
|
"-Clink-arg=-Wl,--stack,16777216",
|
|
"-Clink-arg=-Wl,--exclude-all-symbols",
|
|
]
|
|
|
|
[target.x86_64-pc-windows-msvc]
|
|
rustflags = [
|
|
"-Clink-arg=/STACK:16777216",
|
|
]
|
|
|
|
# Also sizes rustc's own threads: rustc 1.99 overflows the default 8 MB
|
|
# compiling this crate in release on Windows/macOS.
|
|
[env]
|
|
RUST_MIN_STACK = "67108864"
|
|
# UI tests render through iced_test, which picks wgpu by default. Several
|
|
# test threads opening GPU devices at once crash the driver (SIGSEGV, about
|
|
# every other parallel `cargo test` run); the software renderer is safe.
|
|
ICED_TEST_BACKEND = "tiny-skia"
|
|
|