Single Rust Codebase Conquers Major GPU Platforms: A Milestone in Cross-Platform GPU Compute

2025-07-26

An exciting project has achieved the feat of running compute logic on all major GPU platforms (NVIDIA CUDA, AMD/Intel/NVIDIA Vulkan, Apple Metal, Windows DirectX 12, WebGPU for browsers, and a CPU fallback) from a single Rust codebase. Leveraging Rust's features like `#![no_std]`, conditional compilation, newtypes, enums, and traits, the project achieves impressive cross-platform generality. The `cargo` build system and testing framework streamline the development process. While challenges remain, such as compiler backend integration and debugging experience, this marks a significant step forward for Rust in cross-platform GPU computing.

Read more
Development

Rust GPU: Bringing Shadertoy Shaders to Rust

2025-04-12

Rust GPU lets you write GPU programs (shaders) in Rust. The authors ported several popular Shadertoy shaders to Rust with ease. Rust GPU compiles Rust code to SPIR-V, integrating seamlessly into Vulkan workflows. The project leverages Rust features like traits, generics, and macros, simplifying CPU/GPU data sharing. Furthermore, the project contributed back to the ecosystem by fixing issues in wgpu and naga.

Read more
Development