mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
f21087ddaf
* docs: sync. `wgpu/Cargo.toml` feature comments with `lib.rs` * Revert "docs: inline `document-features` usage, remove dep." This reverts commit 3d5bec659b9cf19f1c64274de0d11808d771cc66, with an update to `document-features`, and preferring to keep new `feature` content. To be clear, the only difference I have observed is the addition of the `serde` feature. In case it shortens anyone's search, the specific issue resolved is [`slint-ui/document-features`#20](https://github.com/slint-ui/document-features/issues/20).
142 lines
3.8 KiB
TOML
142 lines
3.8 KiB
TOML
[package]
|
|
name = "wgpu-core"
|
|
version = "0.19.0"
|
|
authors = ["gfx-rs developers"]
|
|
edition = "2021"
|
|
description = "WebGPU core logic on wgpu-hal"
|
|
homepage = "https://wgpu.rs/"
|
|
repository = "https://github.com/gfx-rs/wgpu"
|
|
keywords = ["graphics"]
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
# 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.70"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
targets = [
|
|
"x86_64-unknown-linux-gnu",
|
|
"x86_64-apple-darwin",
|
|
"x86_64-pc-windows-msvc",
|
|
"wasm32-unknown-unknown",
|
|
]
|
|
|
|
[lib]
|
|
|
|
[features]
|
|
default = ["link"]
|
|
|
|
## Log all API entry points at info instead of trace level.
|
|
api_log_info = []
|
|
|
|
## Log resource lifecycle management at info instead of trace level.
|
|
resource_log_info = []
|
|
|
|
## Use static linking for libraries. Disable to manually link. Enabled by default.
|
|
link = ["hal/link"]
|
|
|
|
## Support the Renderdoc graphics debugger:
|
|
## <https://renderdoc.org/>
|
|
renderdoc = ["hal/renderdoc"]
|
|
|
|
## Apply run-time checks, even in release builds. These are in addition
|
|
## to the validation carried out at public APIs in all builds.
|
|
strict_asserts = ["wgt/strict_asserts"]
|
|
|
|
## Enables serialization via `serde` on common wgpu types.
|
|
serde = ["dep:serde", "wgt/serde", "arrayvec/serde"]
|
|
|
|
## Enable API tracing.
|
|
trace = ["ron", "serde", "naga/serialize"]
|
|
|
|
## Enable API replaying
|
|
replay = ["serde", "naga/deserialize"]
|
|
|
|
## Enable `ShaderModuleSource::Wgsl`
|
|
wgsl = ["naga/wgsl-in"]
|
|
|
|
## Enable `ShaderModuleSource::Glsl`
|
|
glsl = ["naga/glsl-in"]
|
|
|
|
## Enable `ShaderModuleSource::SpirV`
|
|
spirv = ["naga/spv-in", "dep:bytemuck"]
|
|
|
|
## Implement `Send` and `Sync` on Wasm, but only if atomics are not enabled.
|
|
##
|
|
## WebGL/WebGPU objects can not be shared between threads.
|
|
## However, it can be useful to artificially mark them as `Send` and `Sync`
|
|
## anyways to make it easier to write cross-platform code.
|
|
## This is technically *very* unsafe in a multithreaded environment,
|
|
## but on a wasm binary compiled without atomics we know we are definitely
|
|
## not in a multithreaded environment.
|
|
fragile-send-sync-non-atomic-wasm = [
|
|
"hal/fragile-send-sync-non-atomic-wasm",
|
|
"wgt/fragile-send-sync-non-atomic-wasm",
|
|
]
|
|
|
|
#! ### Backends, passed through to wgpu-hal
|
|
# --------------------------------------------------------------------
|
|
|
|
## Enable the `metal` backend.
|
|
metal = ["hal/metal"]
|
|
|
|
## Enable the `vulkan` backend.
|
|
vulkan = ["hal/vulkan"]
|
|
|
|
## Enable the `GLES` backend.
|
|
##
|
|
## This is used for all of GLES, OpenGL, and WebGL.
|
|
gles = ["hal/gles"]
|
|
|
|
## Enable the `dx12` backend.
|
|
dx12 = ["hal/dx12"]
|
|
|
|
[dependencies]
|
|
arrayvec = "0.7"
|
|
bit-vec = "0.6"
|
|
bitflags = "2"
|
|
bytemuck = { version = "1.14", optional = true }
|
|
codespan-reporting = "0.11"
|
|
document-features.workspace = true
|
|
indexmap = "2"
|
|
log = "0.4"
|
|
once_cell = "1"
|
|
# parking_lot 0.12 switches from `winapi` to `windows`; permit either
|
|
parking_lot = ">=0.11,<0.13"
|
|
profiling = { version = "1", default-features = false }
|
|
raw-window-handle = { version = "0.6", optional = true }
|
|
ron = { version = "0.8", optional = true }
|
|
rustc-hash = "1.1"
|
|
serde = { version = "1", features = ["serde_derive"], optional = true }
|
|
smallvec = "1"
|
|
thiserror = "1"
|
|
|
|
[dependencies.naga]
|
|
path = "../naga"
|
|
version = "0.19.0"
|
|
features = ["clone"]
|
|
|
|
[dependencies.wgt]
|
|
package = "wgpu-types"
|
|
path = "../wgpu-types"
|
|
version = "0.19.0"
|
|
|
|
[dependencies.hal]
|
|
package = "wgpu-hal"
|
|
path = "../wgpu-hal"
|
|
version = "0.19.0"
|
|
default_features = false
|
|
|
|
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
|
|
web-sys = { version = "0.3.67", features = [
|
|
"HtmlCanvasElement",
|
|
"OffscreenCanvas",
|
|
] }
|
|
|
|
[build-dependencies]
|
|
cfg_aliases.workspace = true
|