[package] name = "wgpu" version = "0.5.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"] subscriber = ["wgc/subscriber"] # Make Vulkan backend available on platforms where it is by default not, e.g. macOS vulkan-portability = ["wgc/gfx-backend-vulkan"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" version = "0.5" git = "https://github.com/gfx-rs/wgpu" rev = "3c6ee8766ae8df8fc5c2b70f7c37d634ff3b79aa" features = ["raw-window-handle"] [dependencies.wgt] package = "wgpu-types" version = "0.5" git = "https://github.com/gfx-rs/wgpu" rev = "3c6ee8766ae8df8fc5c2b70f7c37d634ff3b79aa" [dependencies] arrayvec = "0.5" futures = "0.3" parking_lot = "0.10" raw-window-handle = "0.3" smallvec = "1" tracing = { version = "0.1", default-features = false, features = ["std"] } typed-arena = "2.0.1" serde = { version = "1", features = ["derive"], optional = true } #Note: we may consider switching this to "dev-dependencies" if users # want to opt into X11 explicitly. [target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies] gfx-backend-vulkan = { version = "0.5", features = ["x11"] } [dev-dependencies] cgmath = "0.17" log = "0.4" png = "0.16" winit = { version = "0.22.1", features = ["web-sys"] } rand = { version = "0.7.2", features = ["wasm-bindgen"] } bytemuck = "1" noise = "0.6.0" [[example]] name="hello-compute" path="examples/hello-compute/main.rs" test = true [patch."https://github.com/gfx-rs/wgpu"] #wgpu-types = { version = "0.5.0", path = "../wgpu/wgpu-types" } #wgpu-core = { version = "0.5.0", path = "../wgpu/wgpu-core" } [patch."https://github.com/gfx-rs/naga"] #naga = { path = "../naga" } [patch."https://github.com/gfx-rs/gfx-extras"] #gfx-descriptor = { version = "0.1.0", path = "../gfx-extras/gfx-descriptor" } #gfx-memory = { version = "0.1.0", path = "../gfx-extras/gfx-memory" } [patch.crates-io] #gfx-hal = { version = "0.5.0", path = "../gfx/src/hal" } #gfx-backend-empty = { version = "0.5.0", path = "../gfx/src/backend/empty" } #gfx-backend-vulkan = { version = "0.5.0", path = "../gfx/src/backend/vulkan" } #gfx-backend-dx12 = { version = "0.5.0", path = "../gfx/src/backend/dx12" } #gfx-backend-dx11 = { version = "0.5.0", path = "../gfx/src/backend/dx11" } #gfx-backend-metal = { version = "0.5.0", path = "../gfx/src/backend/metal" } [target.'cfg(target_os = "macos")'.dependencies] objc = "0.2.7" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] env_logger = "0.7" [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "0.2.62" web-sys = { version = "0.3.39", 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", "GpuOrigin3dDict", "GpuPipelineLayout", "GpuPipelineLayoutDescriptor", "GpuPowerPreference", "GpuPrimitiveTopology", "GpuProgrammableStageDescriptor", "GpuQueue", "GpuRasterizationStateDescriptor", "GpuRenderPassColorAttachmentDescriptor", "GpuRenderPassDepthStencilAttachmentDescriptor", "GpuRenderPassDescriptor", "GpuRenderPassEncoder", "GpuRenderPipeline", "GpuRenderPipelineDescriptor", "GpuRequestAdapterOptions", "GpuSampler", "GpuSamplerDescriptor", "GpuShaderModule", "GpuShaderModuleDescriptor", "GpuStencilOperation", "GpuStencilStateFaceDescriptor", "GpuStoreOp", "GpuSwapChain", "GpuSwapChainDescriptor", "GpuTexture", "GpuTextureAspect", "GpuTextureComponentType", "GpuTextureCopyView", "GpuTextureDescriptor", "GpuTextureDimension", "GpuTextureFormat", "GpuTextureViewDescriptor", "GpuTextureViewDimension", "GpuTextureView", "GpuVertexAttributeDescriptor", "GpuVertexBufferLayoutDescriptor", "GpuVertexFormat", "GpuVertexStateDescriptor", "GpuVertexAttributeDescriptor", "HtmlCanvasElement", "Window", ]} js-sys = "0.3.39" wasm-bindgen-futures = "0.4.12" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] console_error_panic_hook = "0.1.6" console_log = "0.1.2"