mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
7572dbeaf9
Uses the `cfg_aliases` crate to replace the `backends!` macro and provide a more natural way to gate backend specific code.
15 lines
380 B
Rust
15 lines
380 B
Rust
fn main() {
|
|
// Setup cfg aliases
|
|
cfg_aliases::cfg_aliases! {
|
|
// Vendors/systems
|
|
apple: { any(target_os = "ios", target_os = "macos") },
|
|
|
|
// Backends
|
|
vulkan: { any(windows, all(unix, not(apple)), feature = "gfx-backend-vulkan") },
|
|
metal: { apple },
|
|
dx12: { windows },
|
|
dx11: { windows },
|
|
gl: { unix },
|
|
}
|
|
}
|