Skip to content

Commit db07582

Browse files
committed
Compile Windows code regardless of the target OS
1 parent 0c5fc95 commit db07582

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ objc2-metal = { version = "0.3", default-features = false, features = [
4747
"std",
4848
], optional = true }
4949

50-
[target.'cfg(windows)'.dependencies.windows]
50+
[dependencies.windows]
5151
version = ">=0.53, <=0.61"
5252
features = [
5353
"Win32_Graphics_Direct3D12",
@@ -60,7 +60,7 @@ optional = true
6060
ash = { version = "0.38", default-features = false, features = ["debug", "loaded"] }
6161
env_logger = "0.10"
6262

63-
[target.'cfg(windows)'.dev-dependencies.windows]
63+
[dev-dependencies.windows]
6464
# API-breaks since Windows 0.58 only affect our examples
6565
version = ">=0.58, <=0.61"
6666
features = [
@@ -93,3 +93,6 @@ d3d12 = ["dep:windows"]
9393
metal = ["dep:objc2", "dep:objc2-metal", "dep:objc2-foundation"]
9494

9595
default = ["d3d12", "vulkan", "metal"]
96+
97+
[patch.crates-io]
98+
windows = { git = "https://github.com/MarijnS95/windows-rs", rev = "4fcda3558" }

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pub mod visualizer;
219219
#[cfg(feature = "vulkan")]
220220
pub mod vulkan;
221221

222-
#[cfg(all(windows, feature = "d3d12"))]
222+
#[cfg(feature = "d3d12")]
223223
pub mod d3d12;
224224

225225
#[cfg(all(target_vendor = "apple", feature = "metal"))]

0 commit comments

Comments
 (0)