forked from gfx-rs/wgpu
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Target Specific Compilation (gfx-rs#7076)
- Loading branch information
1 parent
f781a6b
commit ae5dc0e
Showing
22 changed files
with
535 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
fn main() { | ||
cfg_aliases::cfg_aliases! { | ||
windows_linux_android: { any(windows, target_os = "linux", target_os = "android") }, | ||
send_sync: { any( | ||
not(target_arch = "wasm32"), | ||
all(feature = "fragile-send-sync-non-atomic-wasm", not(target_feature = "atomics")) | ||
) }, | ||
webgl: { all(target_arch = "wasm32", not(target_os = "emscripten"), gles) }, | ||
dx12: { all(target_os = "windows", feature = "dx12") }, | ||
gles: { all(feature = "gles") }, | ||
webgl: { all(target_arch = "wasm32", not(target_os = "emscripten"), feature = "webgl") }, | ||
gles: { any( | ||
all(windows_linux_android, feature = "gles"), // Regular GLES | ||
all(webgl), // WebGL | ||
all(target_os = "emscripten", feature = "gles"), // Emscripten GLES | ||
all(target_vendor = "apple", feature = "angle") // ANGLE on Apple | ||
) }, | ||
vulkan: { any( | ||
all(windows_linux_android, feature = "vulkan"), // Regular Vulkan | ||
all(target_vendor = "apple", feature = "vulkan-portability") // Vulkan Portability on Apple | ||
) }, | ||
metal: { all(target_vendor = "apple", feature = "metal") }, | ||
vulkan: { all(not(target_arch = "wasm32"), feature = "vulkan") } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "wgpu-core-deps-apple" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
description = "Feature unification helper crate for Apple platforms" | ||
homepage.workspace = true | ||
repository.workspace = true | ||
keywords.workspace = true | ||
license.workspace = true | ||
readme = "README.md" | ||
|
||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to | ||
# copy the crates it actually uses out of the workspace, so it's meaningful for | ||
# them to have less restrictive MSRVs individually than the workspace as a | ||
# whole, if their code permits. See `../README.md` for details. | ||
rust-version = "1.76" | ||
|
||
[features] | ||
metal = ["wgpu-hal/metal"] | ||
angle = ["wgpu-hal/gles", "wgpu-hal/renderdoc"] | ||
vulkan-portability = ["wgpu-hal/vulkan", "wgpu-hal/renderdoc"] | ||
|
||
# Depend on wgpu-hal conditionally, so that the above features only apply to wgpu-hal on this set of platforms. | ||
[target.'cfg(target_vendor = "apple")'.dependencies] | ||
wgpu-hal.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This crate exists to allow platform and feature specific features work correctly. The features | ||
enabled on this crate are only enabled on `target_vendor = "apple"` platforms. See wgpu-hal's `Cargo.toml` | ||
for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! This crate exists to allow platform and feature specific features work correctly. The features | ||
//! enabled on this crate are only enabled on `target_vendor = "apple"` platforms. See wgpu-hal's `Cargo.toml` | ||
//! for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "wgpu-core-deps-emscripten" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
description = "Feature unification helper crate for the Emscripten platform" | ||
homepage.workspace = true | ||
repository.workspace = true | ||
keywords.workspace = true | ||
license.workspace = true | ||
readme = "README.md" | ||
|
||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to | ||
# copy the crates it actually uses out of the workspace, so it's meaningful for | ||
# them to have less restrictive MSRVs individually than the workspace as a | ||
# whole, if their code permits. See `../README.md` for details. | ||
rust-version = "1.76" | ||
|
||
[features] | ||
gles = ["wgpu-hal/gles"] | ||
|
||
# Depend on wgpu-hal conditionally, so that the above features only apply to wgpu-hal on this set of platforms. | ||
[target.'cfg(target_os = "emscripten")'.dependencies] | ||
wgpu-hal.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This crate exists to allow platform and feature specific features work correctly. The features | ||
enabled on this crate are only enabled on `target_os = "emscripten"` platforms. | ||
See wgpu-hal's `Cargo.toml` for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! This crate exists to allow platform and feature specific features work correctly. The features | ||
//! enabled on this crate are only enabled on `target_os = "emscripten"` platforms. | ||
//! See wgpu-hal's `Cargo.toml` for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[package] | ||
name = "wgpu-core-deps-wasm" | ||
version.workspace = true | ||
authors.workspace = true | ||
edition.workspace = true | ||
description = "Feature unification helper crate for the WebAssembly platform" | ||
homepage.workspace = true | ||
repository.workspace = true | ||
keywords.workspace = true | ||
license.workspace = true | ||
readme = "README.md" | ||
|
||
# Override the workspace's `rust-version` key. Firefox uses `cargo vendor` to | ||
# copy the crates it actually uses out of the workspace, so it's meaningful for | ||
# them to have less restrictive MSRVs individually than the workspace as a | ||
# whole, if their code permits. See `../README.md` for details. | ||
rust-version = "1.76" | ||
|
||
[features] | ||
webgl = ["wgpu-hal/gles"] | ||
|
||
# Depend on wgpu-hal conditionally, so that the above features only apply to wgpu-hal on this set of platforms. | ||
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies] | ||
wgpu-hal.workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This crate exists to allow platform and feature specific features work correctly. The features | ||
enabled on this crate are only enabled on `target_arch = "wasm32"` platforms. See wgpu-hal's `Cargo.toml` | ||
for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
//! This crate exists to allow platform and feature specific features work correctly. The features | ||
//! enabled on this crate are only enabled on `target_arch = "wasm32"` platforms. See wgpu-hal's `Cargo.toml` | ||
//! for more information. |
Oops, something went wrong.