mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
The default functions are generated using a `macro_rules_attribute` emulated derive macro, just fancy enough to work. It does not support structs with generics, so `*Descriptor`s are left alone for now. When Rust const traits stabilize, we can replace this with real const traits.
89 lines
2.4 KiB
TOML
89 lines
2.4 KiB
TOML
[package]
|
|
name = "wgpu-types"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
description = "Common types and utilities for wgpu, the cross-platform, safe, pure-rust graphics API"
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
license.workspace = true
|
|
|
|
# Override the workspace's `rust-version` key. `wgpu-core` and its dependencies
|
|
# have a less strict MSRV, to allow firefox more leeway in updating their Rust toolchain.
|
|
#
|
|
# See the repo README for more information on MSRV policy.
|
|
rust-version = "1.87"
|
|
|
|
[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",
|
|
]
|
|
|
|
[lints.rust]
|
|
missing_debug_implementations = "warn"
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(web_sys_unstable_apis)'] }
|
|
|
|
[lints.clippy]
|
|
std_instead_of_core = "warn"
|
|
std_instead_of_alloc = "warn"
|
|
alloc_instead_of_core = "warn"
|
|
|
|
[lib]
|
|
|
|
[features]
|
|
default = ["std"]
|
|
std = ["js-sys?/std", "web-sys?/std", "naga-types/std"]
|
|
strict_asserts = []
|
|
fragile-send-sync-non-atomic-wasm = []
|
|
serde = [
|
|
"dep:serde",
|
|
"bitflags/serde",
|
|
"naga-types/serialize",
|
|
"naga-types/deserialize",
|
|
]
|
|
# Enables some internal instrumentation for debugging purposes.
|
|
counters = []
|
|
# Enables variants of `Trace` other than `Trace::Off`
|
|
trace = ["std", "serde/std"]
|
|
# Enable web-specific dependencies for wasm.
|
|
web = ["dep:js-sys", "dep:web-sys"]
|
|
exhaust = ["dep:exhaust"]
|
|
|
|
[dependencies]
|
|
naga-types = { workspace = true, features = [] }
|
|
|
|
bitflags.workspace = true
|
|
bytemuck = { workspace = true, features = ["derive"] }
|
|
exhaust = { workspace = true, optional = true }
|
|
log.workspace = true
|
|
macro_rules_attribute.workspace = true
|
|
raw-window-handle.workspace = true
|
|
serde = { workspace = true, default-features = false, features = [
|
|
"alloc",
|
|
"derive",
|
|
], optional = true }
|
|
static_assertions.workspace = true
|
|
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
js-sys = { workspace = true, optional = true, default-features = false }
|
|
web-sys = { workspace = true, optional = true, default-features = false, features = [
|
|
"ImageBitmap",
|
|
"ImageData",
|
|
"HtmlImageElement",
|
|
"HtmlVideoElement",
|
|
"HtmlCanvasElement",
|
|
"OffscreenCanvas",
|
|
"VideoFrame",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
exhaust.workspace = true
|
|
hashbrown.workspace = true
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json.workspace = true
|