Graphite/.cargo/config.toml

23 lines
968 B
TOML

[build]
# Keep `--cfg=web_sys_unstable_apis` here so the wasm wrapper crates build with the same web-sys API signatures (e.g. `put_image_data`/`get_image_data` taking `i32` rather than `f64`) on both native test builds and the wasm target. Cargo applies `[build]` rustflags only when no target-specific rustflags table matches, so the wasm-specific list below must continue to include this cfg.
rustflags = ["--cfg=web_sys_unstable_apis"]
[target.wasm32-unknown-unknown]
rustflags = [
# Currently disabled because of https://github.com/GraphiteEditor/Graphite/issues/1262
# The current simd implementation leads to undefined behavior
#"-C",
#"target-feature=+simd128",
"-C",
"target-feature=+bulk-memory",
"-C",
"link-arg=--max-memory=4294967296",
"--cfg=web_sys_unstable_apis",
# TODO: Remove this and find a better way to stay within the 25MB limit of cloudflare pages
"-C",
"opt-level=s",
]
[env]
CARGO_WORKSPACE_DIR = { value = "", relative = true }