Skip to content

Releases: Rust-GPU/rust-gpu

v0.10.0-alpha.1

17 Apr 14:13

Choose a tag to compare

Toolchain: nightly-2026-04-11 (rustc 1.96.0)

Added ⭐

  • PR#493 add spirv-unknown-naga-wgsl target to transpile to wgsl with naga 29

  • PR#271 added new targets: vulkan1.3, vulkan1.4, spv1.6

  • PR#177 added NonUniform SPIR-V decoration for every image and buffer access when NonUniform capability is enabled

  • PR#394 remove unsafe from safe SPIR-V intrinsic functions

  • PR#44 added mesh shaders with task shaders and per-primitive output attributes

  • entry point:

    • PR#514 allowed zero-sized types in entry point input/output positions
    • PR#509 added validation for incorrect LocalInvocationIndex type, must be u32
    • PR#16 added
      TypedBuffer,
      an explicit way to declare inputs and outputs as buffers, useful for arrays of buffer descriptors
    • PR#448 added arrayed specialization constants, allowing spec constants declared as fixed-size arrays occupying consecutive IDs
    • PR#482 added explicit #[spirv(location = N)] support, fixed overlapping location assignment for larger-than Vec4 structs
  • subgroup intrinsics:

    • PR#14 added subgroup intrinsics matching GLSL's GL_KHR_shader_subgroup
    • PR#441 added ScalarComposite trait and derive macro, enabling composite types (scalars, vectors, arrays, structs, repr-int enums) in subgroup intrinsics
  • ray tracing:

    • PR#391 added Matrix4x3 type for ray tracing intrinsics
    • PR#343 added RayQuery::get_intersection_triangle_vertex_positions() for ray tracing
    • PR#339 added HitTriangleVertexPositionsKHR built-in for ray tracing pipelines
  • spirv-builder

    • PR#477 removed the need for crate-type = ["dylib"] in shader crate Cargo.toml
    • PR#488 replaced enum MetadataPrintout with struct BuildScriptConfig; shader compilation warnings now properly forwarded to build output
    • PR#265 added #[non_exhaustive] on SpirvBuilder and dependent structs; use builder patterns instead of direct construction
    • PR#13 allowed cargo features and default-features to be passed to the shader crate
    • PR#422 redesigned the spirv-builder watch API: simpler Watcher returning CompileResult directly from recv(), with try_recv() for non-blocking polling
    • PR#223 added SpirvBuilder::target_dir_path to set the target directory explicitly
    • PR#188 added RUSTGPU_CARGOFLAGS environment variable for passing extra cargo flags
  • cargo-gpu

    • added cargo-gpu to allow CPU code to be compiled by a stable toolchain
    • PR#131 added cargo gpu clippy and cargo gpu check for linting/checking shader code
    • PR#109 added --package/-p akin to cargo
    • PR#16 added [package.metadata.rust-gpu] support in Cargo.toml for declarative build configuration
    • PR#42 added --watch flag for auto-recompilation on source changes
    • PR#71 refactored cargo-gpu from a binary into a library with a public API that's usable from build scripts
    • PR#132 extracted install logic into a separate cargo-gpu-install crate, reducing dependency count by ~30 crates for library consumers

Changed 🛠

  • Updated Rust nightly toolchain to nightly-2026-04-11

  • PR#249 updated to Rust 2024 edition

  • PR#380 glam types have the same layout on GPU and CPU to prevent sutle UB bugs with Vec3, requires at least glam 0.30.8

  • PR#395 make many APIs explicitly use glam types instead of generics

  • ByteAddressableBuffer:

    • PR#17 refactored ByteAddressableBuffer to allow reading from read-only buffers
    • PR#430 fix ByteAddressableBuffer stores of scalar pair types
    • PR#353 soundness fix: respect read_scalar errors instead of silently corrupting data
  • image:

    • PR#281 allow SampledImage to access query_size_lod and query_size
    • PR#361 added Image::fetch_with_lod shortcut for Image::fetch_with(..., lod(...))
    • PR#490 made Image::fetch() implicitly declare LOD 0
    • PR#474 allow Image::write() to write scalar values into scalar images

Fixed 🩹

  • PR#552 massive speedups for mem2reg linker step

  • PR#364 fixed libm intrinsics for versions newer than 0.2.11

  • PR#233 fixed array of array types

  • PR#167 fixed debug_printf macros not escaping { and } correctly

  • codegen:

    • PR#15 fixed signed for loops
    • PR#213 fixed leading_zeros, trailing_zeros and count_ones intrinsics
    • PR#174 added support for signed integer bswap
    • PR#363 allow std::hint::black_box to be a no-op on GPU
    • PR#518 replace num_traits::Float::powi implementation with GLSL.std.450 Pow intrinsics
    • PR#200 fixed log10 intrinsic
    • PR#1129 fixed bit rotates being completely broken
    • PR#227 fixed array init with 0i32 incorrectly using 0u32
    • PR#224 fixed typo swapping logical operations on bools
    • PR#302 optimize constant casts to avoid requiring Int64 capabilities
  • spirv-val:

    • PR#512 fixed validation failures with newer spirv-val (v2025.5+) by folding OpLoad from Private variables with constant initializers
    • PR#456 fixed unused shared memory causing validation errors
    • PR#379 fixed Vulkan validation errors by erasing explicit layout decorations when disallowed
  • ICE:

    • PR#431 fixed divide-by-zero ICE
    • PR#453 fixed ICE on indirect function pointers