[package] name = "wgpu" version = "0.7.0" authors = ["wgpu developers"] edition = "2018" description = "Rusty WebGPU API wrapper" homepage = "https://github.com/gfx-rs/wgpu-rs" repository = "https://github.com/gfx-rs/wgpu-rs" keywords = ["graphics"] license = "MPL-2.0" exclude = ["etc/**/*", "examples/**/*", "tests/**/*", "Cargo.lock", "target/**/*"] [package.metadata.docs.rs] all-features = true [lib] [features] default = [] trace = ["serde", "wgc/trace"] replay = ["serde", "wgc/replay"] # Make Vulkan backend available on platforms where it is by default not, e.g. macOS vulkan-portability = ["wgc/gfx-backend-vulkan"] webgl = ["wgc"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" features = ["raw-window-handle"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" features = ["raw-window-handle"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" rev = "b1b44ca78c6a55e200f25da38f7b47b4c90928e9" [dependencies] arrayvec = "0.5" parking_lot = "0.11" raw-window-handle = "0.3" smallvec = "1" tracing = { version = "0.1", default-features = false, features = ["std"] } serde = { version = "1", features = ["derive"], optional = true } [dev-dependencies] bytemuck = { version = "1.4", features = ["derive"] } cgmath = "0.18" ddsfile = "0.4" log = "0.4" naga = { git = "https://github.com/gfx-rs/naga", tag = "gfx-10", features = ["wgsl-in"] } noise = "0.7" png = "0.16" rand = { version = "0.7.2", features = ["wasm-bindgen"] } winit = { version = "0.24.0", features = ["web-sys"] } [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] async-executor = "1.0" pollster = "0.2" wgpu-subscriber = "0.1" [target.'cfg(target_arch = "wasm32")'.dependencies.naga] git = "https://github.com/gfx-rs/naga" tag = "gfx-10" features = ["wgsl-in", "spv-out"] [[example]] name="hello-compute" path="examples/hello-compute/main.rs" test = true [patch."https://github.com/gfx-rs/wgpu"] #wgpu-types = { version = "0.6", path = "../wgpu/wgpu-types" } #wgpu-core = { version = "0.6", path = "../wgpu/wgpu-core" } [patch."https://github.com/gfx-rs/subscriber"] #wgpu-subscriber = { version = "0.1", path = "../subscriber" } [patch."https://github.com/gfx-rs/naga"] #naga = { path = "../naga" } [patch."https://github.com/zakarumych/gpu-descriptor"] #gpu-descriptor = { path = "../gpu-descriptor/gpu-descriptor" } [patch."https://github.com/zakarumych/gpu-alloc"] #gpu-alloc = { path = "../gpu-alloc/gpu-alloc" } [patch."https://github.com/gfx-rs/gfx"] #gfx-hal = { path = "../gfx/src/hal" } #gfx-backend-empty = { path = "../gfx/src/backend/empty" } #gfx-backend-vulkan = { path = "../gfx/src/backend/vulkan" } #gfx-backend-gl = { path = "../gfx/src/backend/gl" } #gfx-backend-dx12 = { path = "../gfx/src/backend/dx12" } #gfx-backend-dx11 = { path = "../gfx/src/backend/dx11" } #gfx-backend-metal = { path = "../gfx/src/backend/metal" } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "=0.2.69" # remember to change version in readme as well web-sys = { version = "=0.3.46", features = [ "Document", "Navigator", "Node", "NodeList", "Gpu", "GpuAdapter", "GpuAddressMode", "GpuBindGroup", "GpuBindGroupEntry", "GpuBindGroupDescriptor", "GpuBindGroupLayout", "GpuBindGroupLayoutEntry", "GpuBindGroupLayoutDescriptor", "GpuBlendDescriptor", "GpuBlendFactor", "GpuBlendOperation", "GpuBindingType", "GpuBuffer", "GpuBufferBinding", "GpuBufferCopyView", "GpuBufferDescriptor", "GpuCanvasContext", "GpuColorDict", "GpuColorStateDescriptor", "GpuCommandBuffer", "GpuCommandBufferDescriptor", "GpuCommandEncoder", "GpuCommandEncoderDescriptor", "GpuCompareFunction", "GpuComputePassDescriptor", "GpuComputePassEncoder", "GpuComputePipeline", "GpuComputePipelineDescriptor", "GpuCullMode", "GpuDepthStencilStateDescriptor", "GpuDevice", "GpuDeviceDescriptor", "GpuExtent3dDict", "GpuFilterMode", "GpuFrontFace", "GpuIndexFormat", "GpuInputStepMode", "GpuLimits", "GpuLoadOp", "GpuMapMode", "GpuOrigin3dDict", "GpuPipelineLayout", "GpuPipelineLayoutDescriptor", "GpuPowerPreference", "GpuPrimitiveTopology", "GpuProgrammableStageDescriptor", "GpuQueue", "GpuRasterizationStateDescriptor", "GpuRenderBundle", "GpuRenderBundleDescriptor", "GpuRenderBundleEncoder", "GpuRenderBundleEncoderDescriptor", "GpuRenderPassColorAttachmentDescriptor", "GpuRenderPassDepthStencilAttachmentDescriptor", "GpuRenderPassDescriptor", "GpuRenderPassEncoder", "GpuRenderPipeline", "GpuRenderPipelineDescriptor", "GpuRequestAdapterOptions", "GpuSampler", "GpuSamplerDescriptor", "GpuShaderModule", "GpuShaderModuleDescriptor", "GpuStencilOperation", "GpuStencilStateFaceDescriptor", "GpuStoreOp", "GpuSwapChain", "GpuSwapChainDescriptor", "GpuTexture", "GpuTextureAspect", "GpuTextureComponentType", "GpuTextureCopyView", "GpuTextureDataLayout", "GpuTextureDescriptor", "GpuTextureDimension", "GpuTextureFormat", "GpuTextureViewDescriptor", "GpuTextureViewDimension", "GpuTextureView", "GpuVertexAttributeDescriptor", "GpuVertexBufferLayoutDescriptor", "GpuVertexFormat", "GpuVertexStateDescriptor", "GpuVertexAttributeDescriptor", "HtmlCanvasElement", "Window", ]} js-sys = "0.3.46" wasm-bindgen-futures = "0.4.19" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] console_error_panic_hook = "0.1.6" console_log = "0.1.2"