mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 00:03:29 +00:00
7b89b6d959
* Ensure webgl example build only contains webgl and webgpu example build only contains webgpu * fix ip printed on run-wasm * Update examples on running examples on the web
81 lines
1.8 KiB
TOML
81 lines
1.8 KiB
TOML
[package]
|
|
name = "wgpu-examples"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
edition.workspace = true
|
|
description = "Common example code"
|
|
homepage.workspace = true
|
|
repository.workspace = true
|
|
keywords.workspace = true
|
|
license.workspace = true
|
|
publish = false
|
|
|
|
[package.metadata.cargo-machete]
|
|
# Cargo machete struggles with this dev dependency:
|
|
ignored = ["wasm_bindgen_test"]
|
|
|
|
[lib]
|
|
path = "src/lib.rs"
|
|
harness = false
|
|
|
|
[[bin]]
|
|
name = "wgpu-examples"
|
|
path = "src/main.rs"
|
|
test = false
|
|
|
|
[features]
|
|
default = []
|
|
webgl = ["wgpu/webgl"]
|
|
webgpu = ["wgpu/webgpu"]
|
|
|
|
[dependencies]
|
|
bytemuck.workspace = true
|
|
cfg-if.workspace = true
|
|
encase = { workspace = true, features = ["glam"] }
|
|
flume.workspace = true
|
|
getrandom.workspace = true
|
|
glam.workspace = true
|
|
ktx2.workspace = true
|
|
log.workspace = true
|
|
nanorand.workspace = true
|
|
noise.workspace = true
|
|
obj.workspace = true
|
|
png.workspace = true
|
|
pollster.workspace = true
|
|
web-time.workspace = true
|
|
wgpu = { workspace = true, default-features = false, features = [
|
|
"wgsl",
|
|
"dx12",
|
|
"metal",
|
|
] }
|
|
winit.workspace = true
|
|
|
|
[dev-dependencies]
|
|
wgpu-test.workspace = true
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
env_logger.workspace = true
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
console_error_panic_hook.workspace = true
|
|
console_log.workspace = true
|
|
fern.workspace = true
|
|
wasm-bindgen.workspace = true
|
|
wasm-bindgen-futures.workspace = true
|
|
# We need these features in the framework examples and tests
|
|
web-sys = { workspace = true, features = [
|
|
"Location",
|
|
"Blob",
|
|
"RequestInit",
|
|
"RequestMode",
|
|
"Request",
|
|
"ImageData",
|
|
"Response",
|
|
"HtmlImageElement",
|
|
"WebGl2RenderingContext",
|
|
"CanvasRenderingContext2d",
|
|
] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
|
|
wasm-bindgen-test.workspace = true
|