From 7ee1ca8d79bb0f9498a2508203da6eb7bf21691f Mon Sep 17 00:00:00 2001 From: Gray Olson Date: Tue, 10 Sep 2024 17:32:48 +0200 Subject: [PATCH] fix cfg-check lints --- .cargo/{config => config.toml} | 0 Cargo.toml | 3 +++ crates/spirv-std/Cargo.toml | 3 +++ crates/spirv-std/macros/Cargo.toml | 3 +++ crates/spirv-std/shared/Cargo.toml | 4 ++++ examples/runners/wgpu/Cargo.toml | 2 +- 6 files changed, 14 insertions(+), 1 deletion(-) rename .cargo/{config => config.toml} (100%) diff --git a/.cargo/config b/.cargo/config.toml similarity index 100% rename from .cargo/config rename to .cargo/config.toml diff --git a/Cargo.toml b/Cargo.toml index 6a7dd83509..1ac7d099d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,9 @@ edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/EmbarkStudios/rust-gpu" +[workspace.lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] } + [workspace.dependencies] spirv-builder = { path = "./crates/spirv-builder", version = "=0.9.0", default-features = false } spirv-std = { path = "./crates/spirv-std", version = "=0.9.0" } diff --git a/crates/spirv-std/Cargo.toml b/crates/spirv-std/Cargo.toml index 2ce5b6d0fa..00f6031dc5 100644 --- a/crates/spirv-std/Cargo.toml +++ b/crates/spirv-std/Cargo.toml @@ -7,6 +7,9 @@ edition.workspace = true license.workspace = true repository.workspace = true +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] } + [dependencies] spirv-std-types.workspace = true spirv-std-macros.workspace = true diff --git a/crates/spirv-std/macros/Cargo.toml b/crates/spirv-std/macros/Cargo.toml index 08c783cebc..2ecf2a1f04 100644 --- a/crates/spirv-std/macros/Cargo.toml +++ b/crates/spirv-std/macros/Cargo.toml @@ -7,6 +7,9 @@ edition.workspace = true license.workspace = true repository.workspace = true +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] } + [lib] proc-macro = true diff --git a/crates/spirv-std/shared/Cargo.toml b/crates/spirv-std/shared/Cargo.toml index 6b05c0379f..c2c26a5dde 100644 --- a/crates/spirv-std/shared/Cargo.toml +++ b/crates/spirv-std/shared/Cargo.toml @@ -6,3 +6,7 @@ authors.workspace = true edition.workspace = true license.workspace = true repository.workspace = true + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] } + diff --git a/examples/runners/wgpu/Cargo.toml b/examples/runners/wgpu/Cargo.toml index fcee868b45..0548bbeee5 100644 --- a/examples/runners/wgpu/Cargo.toml +++ b/examples/runners/wgpu/Cargo.toml @@ -24,7 +24,7 @@ futures = { version = "0.3", default-features = false, features = ["std", "execu wgpu = { version = "22.1", features = ["spirv", "vulkan-portability"] } winit = { version = "0.29.0", features = ["android-native-activity", "rwh_05"] } clap = { version = "4", features = ["derive"] } -strum = { version = "0.25.0", default_features = false, features = ["std", "derive"] } +strum = { version = "0.25.0", default-features = false, features = ["std", "derive"] } bytemuck = "1.6.3" [target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]