NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #1499 most downloaded on crates.io
Cross-platform, safe, pure-rust graphics API
Latest stable
30.0.2
Last release 3 days ago
12 Nov 2026
Ships on a steady schedule
a new release about every 2 months
Most releases are documented
notes for 52 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
8 years old
67 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
This release includes wgpu, wgpu-core, wgpu-hal, and wgpu-types.
This release includes wgpu, wgpu-core, wgpu-hal, and wgpu-types.
WGSL syntax has changed in a couple ways. The new syntax is easier to read and work with.
Attribute declarations are written differently:
- [[group(1), binding(0)]]
+ @group(1) @binding(0)
Stage declarations are now separate attributes rather than part of the stage attribute:
- [[stage(vertex)]]
+ @vertex
Structs now use , as field separator and no longer need semicolons after the declaration:
- struct MyStruct {
- my_member: u32;
- };
+ struct MyStruct {
+ my_member: u32,
+ }
The method of getting the preferred swapchain format has changed to allow viewing all formats supported by the surface.
- let format = surface.get_preferred_format(&adapter).unwrap();
+ let format = surface.get_supported_formats(&adapter)[0];
Presentation modes now need to match exactly what the surface supports. FIFO is always supported,
but all other modes vary from API to API and Device to Device. To get a list of all supported modes,
call the following. The order does not indicate preference.
let modes = surface.get_supported_present_modes(&adapter);
Timestamp queries are now restricted behind multiple features to allow implementation on TBDR (Tile-Based Deferred Rendering) based GPUs, such as mobile devices and Apple's M chips.
Features::TIMESTAMP_QUERIES now allows for calling write_timestamp only on CommandEncoders.
Features::WRITE_TIMESTAMP_INSIDE_PASSES is needed to call write_timestamp on RenderPassEncoders or ComputePassEncoders.
The function for mapping buffers no longer returns a future, and instead calls a callback when the buffer is mapped.
This aligns with the use of the API more clearly - you aren't supposed to block and wait on the future to resolve, you are supposed to keep rendering and wait until the buffer maps on its own. Mapping and the flow of mapping is an under-documented area that we hope to improve in the future.
- let future = buffer.slice(..).map_async(MapMode::Read);
+ buffer.slice(..).map_async(MapMode::Read, || {
+ // Called when buffer is mapped.
+ })
Calling queue.submit now returns an opaque submission index that can be used as an argument to
device.poll to say which submission to wait to complete.
Device::create_shader_module now takes the shader descriptor by value:
- device.create_shader_module(&shader_module_descriptor)
+ device.create_shader_module(shader_module_descriptor)
Color attachments can be sparse, so they are now optional:
FragmentState {
- targets: &[color_target_state]
+ targets: &[Some(color_target_state)]
// ..
}
RenderPassDescriptor {
- color_attachments: &[render_pass_color_attachment]
+ color_attachments: &[Some(render_pass_color_attachment)]
// ..
}
RenderBundleEncoderDescriptor {
- color_formats: &[texture_format]
+ color_formats: &[Some(texture_format)]
// ..
}
Extent3d::max_mips now requires you to pass a TextureDimension to specify whether or not depth_or_array_layers should be ignored:
Extent3d {
width: 1920,
height: 1080,
depth_or_array_layers: 6,
- }.max_mips()
+ }.max_mips(wgpu::TextureDimension::D3)
Limits has a new field, max_buffer_size (not an issue if you don't define limits manually):
Limits {
// ...
+ max_buffer_size: 256 * 1024 * 1024, // adjust as you see fit
}
ComputePass::dispatch has been renamed to ComputePass::dispatch_workgroups
- cpass.dispatch(self.work_group_count, 1, 1)
+ cpass.dispatch_workgroups(self.work_group_count, 1, 1)
util::indirect::* helper structs by @IcanDivideBy0 in #2365AddressMode::ClampToZero by @laptou in #2364(wgpu). by @kpreid in #2590queue_empty for Device::poll by @xiaopengli89 in #2643SHADER_FLOAT16 feature by @jinleili in #2646vulkan-portability feature by @jinleili in #2488Features::MULTI_DRAW_INDIRECT to Metal by @expenses in #2737Option<std::time::Duration> timeouts by @rib in #2724execute_bundles() receive IntoIterator by @maku693 in #2410wgpu_hal::MAX_COLOR_TARGETS to 8. by @jimblandy in #2640create_surface by @jinleili in #2736wgpu::Device is dropped. by @jimblandy in #2567Storage::get by @SparkyPotato in #2657WEBGPU_TEXTURE_FORMAT_SUPPORT to 1 << 14 instead of 1 << 15 by @expenses in #2772TextureDimensionError::LimitExceeded. by @kpreid in #2799#[cfg] conditions from backend/direct.rs. by @jimblandy in #2811wgpu_types::Features values. by @jimblandy in #2817Surface::from_uiview can not guarantee set correct contentScaleFactor by @jinleili in #2470max_buffer_size by the correct physical device restriction by @jinleili in #2502PrivateCapabilities creation by @jinleili in #2509push | pop_debug_marker by @jinleili in #2537Rgb9e5Ufloat capabilities and sampler_lod_average support by @jinleili in #2656log::error! debugging statement from the gles queue by @expenses in #2630webgl feature by @jakobhellermann in #2355GpuFuture. by @jimblandy in #2644VertexStepMode. by @jimblandy in #2685wgpu_core's Id and gfx_select!. by @jimblandy in #2766ash to 0.37 by @a1phyr in #2557cgmath to glam in examples by @a1phyr in #2544from_index method is unneeded. by @jimblandy in #2424new method for RefCount. by @jimblandy in #2570gles::egl module. by @jimblandy in #2576timeout_us to timeout_ns, to match actual units. by @jimblandy in #2645Global::create_buffer_error. by @jimblandy in #2673VertexStep: a stride and a step mode. by @jimblandy in #2768Your coding agent can read these notes before it upgrades. Set up the MCP server →
DEPTH_CLIP_CONTROL feature to replace the old DEPTH_CLAMP
MULTIVIEW featureDEPTH_CLIP_CONTROL feature to replace the old DEPTH_CLAMPTEXTURE_FORMAT_16BIT_NORM featureSamplerBindingType instead of booleansTEXTURE_BINDING_ARRAY featuremin_binding_size late at drawcopy_texture_to_texturestrip_index_format to be none if unusedRgba16Float formatset_index_buffer and set_vertex_buffer to have optional sizesNothing published for this version
Deno WebGPU plugin is a part of the repository
SwapchainFrame is removed. SurfaceTexture::present() needs to be called instead of dropping.min_uniform_buffer_offset_alignment and min_storage_buffer_offset_alignmentPARTIALLY_BOUND_BINDING_ARRAYNON_FILL_POLYGON_MODE is split into POLYGON_MODE_LINE and POLYGON_MODE_POINTwrite_texture for array texturesOpNameNothing published for this version
Nothing published for this version
gfx-hal is replaced by the in-house graphics abstraction wgpu-hal. Backends: Vulkan, Metal, D3D-12, and OpenGL ES-3.
gfx-hal is replaced by the in-house graphics abstraction wgpu-hal. Backends: Vulkan, Metal, D3D-12, and OpenGL ES-3.cross feature is removed entirely. Only Rust code from now on.spirv compile feature enabledFeatures::SPIRV_SHADER_PASSTHROUGH run-time feature allows providing pass-through SPIR-V (orthogonal to the compile feature)TextureUsage, BufferUsage, ColorWrite.SwapChain is merged into Surface. Returned frames are Texture instead of TextureView.TextureUsage bits: SAMPLED -> TEXTURE_BINDING, STORAGE -> STORAGE_BINDING.InputStepMode to VertexStepMode.Rgb9e5Ufloat format.resolver = "2" is now required in top-level cargo manifestsDevice::create_query_set would return an error when creating exactly QUERY_SET_MAX_QUERIES (8192) queries. Now it only returns an error when trying to create more than QUERY_SET_MAX_QUERIES queries.Features::TEXTURE_SPECIFIC_FORMAT_FEATURES not being supported for rendertargetsFeatures::VERTEX_WRITABLE_STORAGE.
v0.5.Features::VERTEX_WRITABLE_STORAGE.Features::CLEAR_COMMANDS which allows you to use cmd_buf.clear_texture and cmd_buf.clear_buffer.8 from 4.Buffer::get_mapped_range can now have a range of zero.Features::VERTEX_WRITABLE_STORAGE is true.PowerPreference::LowPower description.wgpu_render_pass_execute_bundleswgpu_render_pass_bundle_indexed_indirect to wgpu_render_bundle_draw_indexed_indirect.Nothing published for this version
naga is used by default to translate shaders, SPIRV-Cross is optional behind cross feature
cross featureRenderPassColorAttachmentDescriptor to RenderPassColorAttachment:
attachment member to viewRenderPassDepthStencilAttachmentDescriptor to RenderPassDepthStencilAttachment:
attachment member to viewVertexFormat values
Float3 -> Float32x3, Ushort2 -> Uint16x2depth value of Extent3d to depth_or_array_layersColorTargetState:
BlendState to BlendComponentBlendState struct to hold color and alpha blend statecolor_blend and alpha_blend members into blend memberclamp_depth from RastizerState to PrimitiveStatePrimitiveState:
conservative member for enabling conservative rasterizationTextureCopyView to ImageCopyTextureTextureDataLayout to ImageDataLayoutbytes_per_row and rows_per_image members of ImageDataLayout from u32 to Option<NonZeroU32> <!-- wgpu-rs only -->BindingResource::Binding from containing fields directly to containing a BufferBindingBindingResource::BufferArraytracing to profilingwgc::device::queue sub-module in publicNothing published for this version
(beta) WGSL support, including the ability to bypass SPIR-V entirely
RenderPipelineDescriptorBindingTypeShaderModuleDescriptorRenderEncoderf64 support in shadersNothing published for this version
C API is moved to another repository
player: standalone API replayer and testerResultwrite_buffer/write_texture queue operationsFrom<TextureFormat> for TextureComponentTypeNothing published for this version
Nothing published for this version
wgpu-types: common types between native and web targets
wgpu-types: common types between native and web targetswgpu-core: internal API for the native and remote wrappersgfx-memory and gfx-descriptor cratesPlatforms: removed OpenGL/WebGL support temporarily
Platforms: experimental OpenGL/WebGL
rendy-memory and rendy-descriptorraw-window-handle integration instead of winitDebugNothing published for this version
Nothing published for this version
Nothing published for this version
wgpu-remote: remoting layer for the cross-process boundary
wgpu-remote: remoting layer for the cross-process boundarygfx-examples: selected gfx pre-ll examples ported overPlatforms: Linux/Vulkan, Windows/Vulkan, D3D12, macOS/Metal
wgpu-native: C API implementation of WebGPU, based on gfx-halwgpu-bindings: auto-generated C headerswgpu: idiomatic Rust wrapperexamples: native C examplesOne column per quarter.