From 03c33dc784d06cfb5bde3da605862b70af84d148 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Tue, 23 Jun 2026 11:09:19 +0200 Subject: [PATCH] Fix error from running `cargo check` with a system global Cargo config.toml `rustflags` override (#4277) Fix error caused by running cargo check in the workspace --- .cargo/config.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 8a5ba33fec..3f8748107a 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,8 +1,8 @@ -[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. +# 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 and the wasm target. +[target.'cfg(not(target_family = "wasm"))'] rustflags = ["--cfg=web_sys_unstable_apis"] -[target.wasm32-unknown-unknown] +[target.'cfg(target_family = "wasm")'] rustflags = [ # Currently disabled because of https://github.com/GraphiteEditor/Graphite/issues/1262 # The current simd implementation leads to undefined behavior