All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.10.0-alpha.1 - 2026-04-13
Toolchain: nightly-2026-04-11 (rustc 1.96.0)
-
PR#493 add
spirv-unknown-naga-wgsltarget to transpile to wgsl with naga 29 -
PR#271 added new targets:
vulkan1.3,vulkan1.4,spv1.6 -
PR#177 added
NonUniformSPIR-V decoration for every image and buffer access whenNonUniformcapability 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
LocalInvocationIndextype, must beu32 - 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-thanVec4structs
-
subgroup intrinsics:
- PR#14 added subgroup intrinsics matching GLSL's
GL_KHR_shader_subgroup - PR#441 added
ScalarCompositetrait and derive macro, enabling composite types (scalars, vectors, arrays, structs, repr-int enums) in subgroup intrinsics
- PR#14 added subgroup intrinsics matching GLSL's
-
ray tracing:
-
spirv-builder- PR#477 removed the need for
crate-type = ["dylib"]in shader crateCargo.toml - PR#488 replaced
enum MetadataPrintoutwithstruct BuildScriptConfig; shader compilation warnings now properly forwarded to build output - PR#265 added
#[non_exhaustive]onSpirvBuilderand 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-builderwatch API: simplerWatcherreturningCompileResultdirectly fromrecv(), withtry_recv()for non-blocking polling - PR#223 added
SpirvBuilder::target_dir_pathto set the target directory explicitly - PR#188 added
RUSTGPU_CARGOFLAGSenvironment variable for passing extra cargo flags
- PR#477 removed the need for
-
cargo-gpu- added
cargo-gputo allow CPU code to be compiled by a stable toolchain - PR#131 added
cargo gpu clippyandcargo gpu checkfor linting/checking shader code - PR#109 added
--package/-pakin tocargo - PR#16 added
[package.metadata.rust-gpu]support inCargo.tomlfor declarative build configuration - PR#42 added
--watchflag 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-installcrate, reducing dependency count by ~30 crates for library consumers
- added
-
Updated Rust nightly toolchain to
nightly-2026-04-11 -
PR#249 updated to Rust 2024 edition
-
PR#380
glamtypes have the same layout on GPU and CPU to prevent sutle UB bugs withVec3, requires at least glam0.30.8 -
PR#395 make many APIs explicitly use
glamtypes instead of generics -
ByteAddressableBuffer: -
image:
-
PR#552 massive speedups for mem2reg linker step
-
PR#364 fixed
libmintrinsics for versions newer than0.2.11 -
PR#233 fixed array of array types
-
PR#167 fixed
debug_printfmacros not escaping{and}correctly -
codegen:
- PR#15 fixed signed
forloops - PR#213 fixed
leading_zeros,trailing_zerosandcount_onesintrinsics - PR#174 added support for signed integer
bswap - PR#363 allow
std::hint::black_boxto be a no-op on GPU - PR#518 replace
num_traits::Float::powiimplementation withGLSL.std.450 Powintrinsics - PR#200 fixed
log10intrinsic - PR#1129 fixed bit rotates being completely broken
- PR#227 fixed array init with
0i32incorrectly using0u32 - PR#224 fixed typo swapping logical operations on bools
- PR#302 optimize constant casts to avoid requiring
Int64capabilities
- PR#15 fixed signed
-
spirv-val:
-
ICE:
- PR#1082 added partial
support for extracting
format_args!frompanic!s, and converting them todebugPrintfcalls (if enabled viaShaderPanicStrategy), including runtime arguments (u32/i32/f32withDisplay/Debugformatting, for now) - PR#1081 added the ability
to access SPIR-V specialization constants (
OpSpecConstant) via entry-point inputs declared as#[spirv(spec_constant(id = ..., default = ...))] x: u32
(see also the#[spirv(spec_constant)]attribute documentation) - PR#1036 added a
--force-spirv-passthruflag toexample-runner-wgpu, to bypass Naga (wgpu's shader translator), used it to testdebugPrintfforwgpu, and updatedShaderPanicStrategy::DebugPrintfThenExitdocs to reflect what "enablingdebugPrintf" looks like forwgpu
(e.g.VK_LOADER_LAYERS_ENABLE=VK_LAYER_KHRONOS_validation VK_LAYER_ENABLES=VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT DEBUG_PRINTF_TO_STDOUT=1) - PR#1080 added
debugPrintf-based panic reporting, with the desired behavior selected viaspirv_builder::ShaderPanicStrategy
(see its documentation for more details about each available panic handling strategy)
- PR#1083 updated SPIR-T to get pretty-printer
improvements (especially for
OpExtInst, including Rust-GPU's custom ones), and started more aggressively deduplicating custom debuginfo instructions (to make SPIR-T dumps more readable) - PR#1079 revised
spirv-builder'sREADME.md, and added a way fordocs.rsto be able to build it (viacargo +stable doc --no-default-features) - PR#1070 made panics (via the
abortintrinsic) early-exit (i.e.returnfrom) the shader entry-point, instead of looping infinitely - PR#1071 updated toolchain to
nightly-2023-05-27
- PR#1064 added a Rust-GPU-private
"extended instruction set" (to allow us to have custom
OpExtInsts), with the initial customOpExtInsts being used to improve debuginfo source locations (using ranges instead of just the starting position, and tracking inlined calls)
- PR#1067 updated toolchain to
nightly-2023-04-15 - PR#1038 relaxed
glamversion requirements (from only0.22, to>=0.22, <=0.24)
- PR#1052 removed
--no-spirt, committing to SPIR-T as a mandatory part of the Rust-GPU compiler backend, to reduce the cost of maintenance, testing and further feature development- Note: if you were using
--no-spirtto work aroundnagaissue #1977
(valid loops causingThe 'break' is used outside of a 'loop' or 'switch' context),
you may be able tocargo update -p nagato update to a fixednagaversion
(0.11.1forwgpu 0.15,0.12.1forwgpu 0.16, and any later versions)
- Note: if you were using
- PR#1059 fixed the
inlinepass not copyingOpDecorates in the callee (which led to their loss).
- PR#1020 added SPIR-T
qptrsupport in the form of--spirt-passes=qptr, a way to turn off "Storage Class inference", and reporting for SPIR-T diagnostics - to testqptrfully, you can use:
RUSTGPU_CODEGEN_ARGS="--no-infer-storage-classes --spirt-passes=qptr"
(see also the SPIR-TqptrPR for more details about theqptrexperiment) - PR#1039 added new experimental
sample_withtoImageAPI to set additional image operands - PR#1031 added
Componentsgeneric parameter toImagetype, allowing images to return lower dimensional vectors and even scalars from the sampling API
- PR#1040 refactored "zombie" (delayed error) reporting to use SPIR-V
OpSource, be more helpful, and added--no-early-report-zombiesto delay it even further
(see also the--no-early-report-zombiescodegen args docs) - PR#1035 reduced the number of CGUs ("codegen units") used by
spirv-builderto just1 - PR#1011 made
NonWritableall read-only storage buffers (i.e. those typed&T, whereTdoesn't have interior mutability) - PR#1029 fixed
SampledImage::samplefns being unnecessarily marked asunsafe - PR#1005 updated toolchain to
nightly-2023-03-04
- PR#1041 fixed
Image::gather()not always returning aVec4. - PR#1025 fixed #1024 by keeping checked arithmetic "zombie"
bools disjoint from normalbool(false) consts - PR#1023 fixed #1021 by always inlining calls with "not obviously legal" pointer args (instead of only inlining calls with "obviously illegal" pointer args)
- PR#1009 fixed #1008 by reinstating mutability checks for entry-point parameters pointing into read-only storage classes (e.g.
#[spirv(uniform)] x: &mut u32is now again an error) - PR#995 fixed #994 by using
OpAtomicFAddEXTinstead ofOpAtomicFMaxEXTinatomic_f_add
- PR#1006 fixed #1002 by rewriting away all
spirv-stduses ofasm!("OpReturnValue %result")and disallowingOpReturn/OpReturnValuefrom inlineasm!(as it's always UB to leaveasm!blocks in any way other than falling through their end)
- PR#998 added
extra_arg()SpirvBuilder API to be able to set codegen args otherwise not supported by the API (for example, to set--spirv-passes)
- PR#999 made the
SPIR-🇹shader IR framework the default (you can opt out viaRUSTGPU_CODEGEN_ARGS=--no-spirt) - PR#992 renamed
rust-toolchaintorust-toolchain.toml - PR#991 updated toolchain to
nightly-2023-01-21 - PR#990 removed return type inference from
ImageAPI and madeglamusage mandatory
- PR#988 added a couple of (highly experimental)
SPIR-🇹optimization passes, and--spirt-passes=...codegen args as a way to enable them
(see also the--spirt-passescodegen args docs)
- PR#982 updated toolchain to
nightly-2022-12-18 - PR#953 migrated to the Rust 2021 edition, and fixed Rust 2021 support for shader crates to be on par with Rust 2018 (discrepancies having been limited to/caused by
panic!changes in Rust 2021)
- PR#959 added two
spirv-builderenvironment variables to customize only therustcinvocations for shader crates and their dependencies:RUSTGPU_RUSTFLAGS="..."for shaderRUSTFLAGS="..."RUSTGPU_CODEGEN_ARGS="..."for shader "codegen args" (i.e.RUSTFLAGS=-Cllvm-args="...")
(check out the "codegen args" docs, or run withRUSTGPU_CODEGEN_ARGS=--helpto see the full list of options)
- PR#940 integrated the experimental
SPIR-🇹shader IR framework into the linker
(opt-in viaRUSTGPU_CODEGEN_ARGS=--spirt, see also the--spirtdocs, for more details)
- PR#958 updated toolchain to
nightly-2022-10-29 - PR#941 applied workspace inheritance to
Cargo.tomlfiles - PR#959 moved
rustc_codegen_spirvdebugging functionality from environment variables to "codegen args" options/flags (see the updated docs for more details) - PR#967 made
--dump-*"codegen args" include identifying information (e.g. crate names) in the names of files they emit
- PR#946 removed the
fn/closure#[spirv(unroll_loops)]attribute, as it has no users, is becoming non-trivial to support, and requires redesign for better ergonomics (e.g.#[spirv(unroll)]applied to individual loops, not the wholefn/closure)
- PR#937 fixed Rust-GPU crates not referring to each-other by exact version
- PR#937 fixed
spirv-stdreferring to an older version ofspirv-std-macros
- PR#935 added check for environment variable
RUSTGPU_SKIP_TOOLCHAIN_CHECKto prevent toolchain check
- 🚨BREAKING🚨 #926 migrated from
register_attrtoregister_tool. More information. - PR#935 updated toolchain to
nightly-2022-10-01 - PR#934 updated
glamto0.22 - PR#928 updated
spirv-toolsto0.9(SPIRV-Tools2022.4)
- PR#934 Removed
glam::BVecsupport (they are no longer#[repl(simd)]inglam, as Rust doesn't support SIMD vectors withboolelements)
- PR#927 re-taught Cargo to rebuild shader crates when
rustc_codegen_spirvis rebuilt, via-Zbinary-dep-depinfo(broken since a toolchain update in0.4.0-alpha.13, and has been causing spurious build failures ever since)
- PR#919 added a build-time check for the nightly toolchain version, to provide user-friendly error messages
- PR#918 updated toolchain to
nightly-2022-08-29
- PR#904 renamed helper
spirv-typescrate tospirv-std-types
- PR#717 added
noreturnsupport to inlineasm! - PR#742 added a
spirv-builderoption to include all debug info - PR#787 documented
Cargo.toml[profile.⋯.build-override]setting for avoiding slow builds - PR#830 added a
spirv-builderoption to preserve unused descriptor bindings - PR#875 added warnings for
#[inline(never)]s the inliner doesn't respect (for legalization reasons) - PR#848 added
#[spirv(subgroup_local_invocation_id)]built-in (and anexamples/shaders/reducecompute shader) - new
spirv-stdAPIs:ByteAddressableBuffer#735,SampledImage::sample_by_lod#755,arch::read_clock_khr#757,arch::{signed,unsigned}_{min,max}#763,debug_printf!#768,arch::*memory_barrier*#769,arch::IndexUnchecked#805,RayQuery::confirm_intersection#822,arch::atomic_i_increment#839,arch::atomic#877
- PR#743 set the SPIR-V "generator magic number" to the value reserved for Rust-GPU
- PR#761 made
spirv-stdbuild on stable Rust by avoidingenums inconst-generics - PR#784 documented
spirv-stdthroughout - PR#862 updated toolchain to
nightly-2022-04-11 - PR#846 updated
spirv-toolsto0.8(SPIRV-Tools2022.1) - PR#888 widened the supported
glamversion range to0.17-0.21
- PR#729 fixed #723 by explicitly allowing unused shader inputs/outputs in storage class inference
- PR#732 fixed
rustcICE messages being truncated withrustc_codegen_spirv(broken since a toolchain update in0.4.0-alpha.12) - PR#737 fixed #642 by re-adding
-Zsymbol-mangling-version=v0(for generic parameters infnnames) - PR#766 fixed #373 and #731 by hooking
rustcto limit function call ABIs to what Rust-GPU supports - PR#793 fixed #748 by supporting SPIR-V
1.4's changed entry-point rules - PR#844 fixed #836 by making newtypes (e.g. single-field structs) wrapping
ScalarPairs (e.g.(u32, u32)or&[T]) have the same SPIR-V type as their inner field
- PR#704 added
Image::gatherandImage::sample_biastospirv-std - PR#709 added float packing/unpacking operations to
spirv-std
- PR#716 updated toolchain to
nightly-2021-08-10
- PR#710 removed "implicit bindless" and kernel modes
- PR#702 updated
glamto0.17
- PR#655 added a
watchfeature tospirv-builderfor hot reloading shaders - PR#652 documented
Image!in the Rust-GPU book - PR#660 added a
spirv-builderoption to name globalOpVariables - PR#662 added type aliases for common uses of
Image! - PR#683 added a
spirv-builderoption to treat warnings as errors
- PR#666 removed
arch::arithmeticfromspirv-std
- fixed miscompilation in peephole optimizations (see PR#646)
- PR#608 added
Image::query_*operations tospirv-std - PR#610 added
spirv-buildersupport for enabling extra extensions and/or capabilities - PR#612 added
is_helper_invocationtospirv-std - PR#624 added
OpTypeSamplerandOpTypeAccelerationStructureKHRsupport to inlineasm! - PR#622 added the ability to query entry-point names from
spirv-builder - PR#630 added a more convenient API to
spirv-builder, for requesting extensions and/or capabilities - PR#629 added an optimization to convert N identical scalar (e.g. arithmetic) ops, into one N-wide vector op (as e.g.
glamonly emits the former) - PR#596 added a
RuntimeArraytype tospirv-val, to represent SPIR-VOpRuntimeArrays - PR#635 added several
spirv-builderoptions for controllingspirv-valflags - PR#643 added
Image::read_subpasstospirv-std
- PR#616 updated
spirv-toolsto0.6.1and turned on emission of line-based debug info - PR#631 updated toolchain to
nightly-2021-05-24 - PR#641 made
spirv-stddepend onglam(0.15.2), instead of the other way around
- PR#607 removed accidental use of
feature(or_patterns)(recently stabilized, only on nightly)
- PR#586 added support for constant memory (
&'static _references), within the limits of SPIR-V - PR#559 added the ability to set a Rust "target triple" in
spirv-builder(e.g."spirv-unknown-vulkan1.1"for Vulkan1.1) - PR#563 added
SPV_KHR_ray_tracingAPIs tospirv-std - PR#572 added
SPV_KHR_ray_queryAPIs tospirv-std - PR#359 added a
const-genericImagetype, andImage!macro wrapping it (to add "named parameters"), tospirv-std
- PR#594 fixed #585 by explicitly banning
Image/Sampler/SampledImageentry-point parameters not behind references - PR#598 fixed #581 by switching
memory::Semanticsfrom anenumto abitflags!, inspirv-std
- PR#583 removed
memcmpfromspirv-std
- PR#519 added
memory_barrierandcontrol_barriertospirv-std
- PR#567 removed the need to manually specify the storage class for
Image/Sampler/ImageSamplerentry-point parameters
- PR#576 deprecated
#[spirv(block)]in favor of automatically wrapping the user types in "interface blocks"
- PR#551 added multi-module (one SPIR-V module per entry-point) support to
spirv-builder - PR#504 added basic support for unsized
structs (e.g. ending with a[T]field) - PR#545 added
Imagemethods for sampling depth reference and/or with project coordinate, tospirv-std
- PR#541 added
#[spirv(invariant)](like theinvariantkeyword in GLSL)
- made
arch::derivativefunctions public, inspirv-std
- PR#498 added
sample_by_lod/sample_by_gradientimage methods tospirv-std - PR#521 added
Cubemaptospirv-std - PR#520 added
arch::primitivefunctions tospirv-std
- PR#496 updated
spirv-toolsto0.5.0 - PR#516 updated toolchain to
nightly-2021-03-21 - PR#443 replaced
spirv_std::storage_class"named pointer types" with#[spirv(...)] &Tentry-point parameters
- PR#480 added a
fetchimage method tospirv-std - PR#446 added
arch::*functions for all SPIR-V arithmetic operations (not involving matrices), tospirv-std
- PR#476 removed
glamas a dependency ofspirv-std
- PR#414 added storage class type inference
- PR#469 added initial support for Algebraic Data Type enums (e.g.
Option<T>) - PR#421 added ability to provide
constarguments toasm! - PR#458 added ability to set
entry_point_namein entry point attributes to change the final name of an entry point - PR#337 added
#[spirv(unroll_loops)]attribute to functions, which tellsrustc_codegen_spirvto annotate all loops inside withUnroll - PR#394 added a new [
arch] module which provides an abstraction some basic SPIR-V instructions as free functions. - PR#340 added the
spirv-std-macroscrate for holding thespirvproc macro - PR#392 added the
gpu_onlyproc macro - PR#377
Derivativeis now implemented forglam::{Vec2, Vec3, Vec3A, Vec4} - PR#401 added ability to build shaders in
releasemode - new
spirv-stdAPIs:vector_extract_dynamicPR#394,vector_insert_dynamicPR#411,textures::StorageImage2dPR#434,any/allPR#380,discardPR#441,demote_to_helper_invocationPR#380,SampledImagePR#320
- PR#461 removed requirement of
#[allow(unused_attributes)]in front of#[spirv]attributes to remove warnings - PR#398
rustc_codegen_spirvnow removes differentOpNames that target the same ID - PR#396
rustc_codegen_spirvnow tries to deduplicate generatedOpVariables
- PR#287 added a new structurizer, which means that you can now use
matchexpressions andcontinues - PR#317 added the
#[spirv(flat)]attribute that matches SPIR-V's "Flat" decorator. - PR#276 added support for textures.
- PR#305 added support for
panic! - PR#165 added support for SPIR-V
1.0 - PR#268 added support for procedural macros
- PR#195 added initial support for compute shaders
- PR#254 added initial support in Rust and
rust-gpufor inline SPIR-V with theasm!nightly feature
- PR#219 improvements to error messages regarding constant pointers
- PR#280 all Storage Classes (e.g.
Input/Output) are now defined inspirv_std::storage_class - PR#275 Rust's language items such
rust_eh_personalityandpanic_handlerare now defined inspirv-stdfor SPIR-V targets
Initial release.