cad-editor/Trunk.toml

24 lines
891 B
TOML
Raw Normal View History

# Trunk config for the web (wasm) build of Open CAD Studio (issue #45).
#
# Build: trunk build --release
# Dev: trunk serve
#
# Requires: rustup target add wasm32-unknown-unknown
# cargo install trunk wasm-bindgen-cli
[build]
target = "index.html"
# Note: the `solid3d` feature is disabled via `data-cargo-no-default-features`
# on the rust <link> in index.html (truck-meshalgo → lzma-sys C deps cannot
# cross-compile to wasm).
2026-07-25 18:49:18 +03:00
[[hooks]]
stage = "post_build"
2026-07-25 18:49:18 +03:00
command = "sh"
command_arguments = ["scripts/build-web-worker.sh"]
[serve]
# Cross-origin isolation headers enable SharedArrayBuffer, which wasm threads
# (rayon) need. GitHub Pages cannot set these; a self-hosted server (e.g. the
# Open-AEC host) can. Without them the app still runs single-threaded.
headers = { "Cross-Origin-Opener-Policy" = "same-origin", "Cross-Origin-Embedder-Policy" = "require-corp" }