[package]
name = "wgpu"
version.workspace = true
authors.workspace = true
edition.workspace = true
description = "Rusty WebGPU API wrapper"
homepage.workspace = true
repository.workspace = true
keywords.workspace = true
license.workspace = true
exclude = [
"etc/**/*",
"examples/**/*.png",
"examples/**/*.dds",
"examples/**/*.ktx2",
"examples/**/*.mtl",
"examples/**/*.obj",
"tests/**/*",
"Cargo.lock",
"target/**/*"
]
autotests = false
[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]
[[test]]
name = "wgpu-tests"
path = "tests/root.rs"
[[example]]
name = "boids"
test = true
[[example]]
name = "bunnymark"
test = true
[[example]]
name = "conservative-raster"
test = true
[[example]]
name = "cube"
test = true
[[example]]
name = "hello-compute"
test = true
[[example]]
name = "mipmap"
test = true
[[example]]
name = "msaa-line"
test = true
[[example]]
name = "shadow"
test = true
[[example]]
name = "skybox"
test = true
[[example]]
name = "texture-arrays"
test = true
[[example]]
name = "water"
test = true
[[example]]
name = "stencil-triangles"
test = true
[features]
default = ["wgsl"]
strict_asserts = ["wgc?/strict_asserts", "wgt/strict_asserts"]
spirv = ["naga/spv-in"]
glsl = ["naga/glsl-in"]
wgsl = ["wgc?/wgsl"]
trace = ["serde", "wgc/trace"]
replay = ["serde", "wgc/replay"]
angle = ["wgc/angle"]
webgl = ["hal", "wgc"]
vulkan-portability = ["wgc/vulkan"]
expose-ids = []
[dependencies.wgc]
optional = true
workspace = true
features = ["raw-window-handle", "gles"]
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies.wgc]
workspace = true
features = ["raw-window-handle", "gles"]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.wgc]
workspace = true
features = ["metal"]
[target.'cfg(windows)'.dependencies.wgc]
workspace = true
features = ["dx11", "dx12"]
[target.'cfg(any(windows, all(unix, not(target_os = "emscripten"), not(target_os = "ios"), not(target_os = "macos"))))'.dependencies.wgc]
workspace = true
features = ["vulkan"]
[dependencies.wgt]
workspace = true
[target.'cfg(any(not(target_arch = "wasm32"), target_os = "emscripten"))'.dependencies]
hal = { workspace = true }
[target.'cfg(all(not(target_arch = "wasm32"), unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
hal = { workspace = true, features = ["renderdoc"] }
[target.'cfg(windows)'.dependencies]
hal = { workspace = true, features = ["dxc_shader_compiler", "renderdoc", "windows_rs"] }
[target.'cfg(target_arch = "wasm32")'.dependencies.hal]
workspace = true
optional = true
[dependencies]
arrayvec.workspace = true
log.workspace = true
parking_lot.workspace = true
profiling.workspace = true
raw-window-handle.workspace = true
serde = { workspace = true, features = ["derive"], optional = true }
smallvec.workspace = true
static_assertions.workspace = true
cfg-if.workspace = true
[dev-dependencies]
bitflags.workspace = true
bytemuck = { workspace = true, features = ["derive"] }
glam.workspace = true
ddsfile.workspace = true
futures-intrusive.workspace = true
env_logger.workspace = true
image.workspace = true
log.workspace = true
noise = { workspace = true }
obj.workspace = true
pollster.workspace = true
png.workspace = true
nanorand = { workspace = true, features = ["wyrand"] }
wasm-bindgen-test.workspace = true
winit.workspace = true
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
async-executor.workspace = true
[dependencies.naga]
workspace = true
features = ["clone"]
optional = true
[dev-dependencies.naga]
workspace = true
features = ["wgsl-in"]
[target.'cfg(target_arch = "wasm32")'.dependencies.naga]
workspace = true
features = ["wgsl-out"]
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features = [
"Document",
"Navigator",
"Node",
"NodeList",
"Gpu",
"GpuAdapter",
"GpuAddressMode",
"GpuAutoLayoutMode",
"GpuBindGroup",
"GpuBindGroupDescriptor",
"GpuBindGroupEntry",
"GpuBindGroupLayout",
"GpuBindGroupLayoutDescriptor",
"GpuBindGroupLayoutEntry",
"GpuBlendComponent",
"GpuBlendFactor",
"GpuBlendOperation",
"GpuBlendState",
"GpuBuffer",
"GpuBufferBinding",
"GpuBufferBindingLayout",
"GpuBufferBindingType",
"GpuBufferDescriptor",
"GpuCanvasAlphaMode",
"GpuCanvasContext",
"GpuCanvasConfiguration",
"GpuColorDict",
"GpuColorTargetState",
"GpuCommandBuffer",
"GpuCommandBufferDescriptor",
"GpuCommandEncoder",
"GpuCommandEncoderDescriptor",
"GpuCompareFunction",
"GpuCompilationInfo",
"GpuCompilationMessage",
"GpuCompilationMessageType",
"GpuComputePassDescriptor",
"GpuComputePassEncoder",
"GpuComputePipeline",
"GpuComputePipelineDescriptor",
"GpuCullMode",
"GpuDepthStencilState",
"GpuDevice",
"GpuDeviceDescriptor",
"GpuDeviceLostInfo",
"GpuDeviceLostReason",
"GpuError",
"GpuErrorFilter",
"GpuExtent3dDict",
"GpuFeatureName",
"GpuFilterMode",
"GpuFragmentState",
"GpuFrontFace",
"GpuImageCopyBuffer",
"GpuImageCopyExternalImage",
"GpuImageCopyTexture",
"GpuImageCopyTextureTagged",
"GpuImageDataLayout",
"GpuIndexFormat",
"GpuLoadOp",
"gpu_map_mode",
"GpuMipmapFilterMode",
"GpuMultisampleState",
"GpuObjectDescriptorBase",
"GpuOrigin2dDict",
"GpuOrigin3dDict",
"GpuOutOfMemoryError",
"GpuPipelineDescriptorBase",
"GpuPipelineLayout",
"GpuPipelineLayoutDescriptor",
"GpuPowerPreference",
"GpuPrimitiveState",
"GpuPrimitiveTopology",
"GpuProgrammableStage",
"GpuQuerySet",
"GpuQuerySetDescriptor",
"GpuQueryType",
"GpuQueue",
"GpuRenderBundle",
"GpuRenderBundleDescriptor",
"GpuRenderBundleEncoder",
"GpuRenderBundleEncoderDescriptor",
"GpuRenderPassColorAttachment",
"GpuRenderPassDepthStencilAttachment",
"GpuRenderPassDescriptor",
"GpuRenderPassEncoder",
"GpuRenderPipeline",
"GpuRenderPipelineDescriptor",
"GpuRequestAdapterOptions",
"GpuSampler",
"GpuSamplerBindingLayout",
"GpuSamplerBindingType",
"GpuSamplerDescriptor",
"GpuShaderModule",
"GpuShaderModuleDescriptor",
"GpuStencilFaceState",
"GpuStencilOperation",
"GpuStorageTextureAccess",
"GpuStorageTextureBindingLayout",
"GpuStoreOp",
"GpuSupportedFeatures",
"GpuSupportedLimits",
"GpuTexture",
"GpuTextureAspect",
"GpuTextureBindingLayout",
"GpuTextureDescriptor",
"GpuTextureDimension",
"GpuTextureFormat",
"GpuTextureSampleType",
"GpuTextureView",
"GpuTextureViewDescriptor",
"GpuTextureViewDimension",
"GpuUncapturedErrorEvent",
"GpuUncapturedErrorEventInit",
"GpuValidationError",
"GpuVertexAttribute",
"GpuVertexBufferLayout",
"GpuVertexFormat",
"GpuVertexState",
"GpuVertexStepMode",
"HtmlCanvasElement",
"OffscreenCanvas",
"ImageBitmap",
"ImageBitmapRenderingContext",
"Window",
"WorkerGlobalScope",
"WorkerNavigator"
] }
wasm-bindgen.workspace = true
js-sys.workspace = true
wasm-bindgen-futures.workspace = true
parking_lot.workspace = true
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
console_error_panic_hook.workspace = true
console_log.workspace = true
web-sys = { workspace = true, features = [
"Location",
"Blob",
"RequestInit",
"RequestMode",
"Request",
"Response",
"WebGl2RenderingContext",
"CanvasRenderingContext2d"
] }