#Writing compute shaders in rust

6 messages · Page 1 of 1 (latest)

compact jungle
#

I want to write a compute shader in rust and don't know what crate is good for this. I heard about a few: wgpu, rust-gpu, rust-cuda, cubecl. I saw there is a lot of resources for wgpu . Anyway what library would be good for that? It's going to be running on nvidia so cuda is fair game

fallen yacht
#

do you want to literally write the shader code in Rust? then you need rust-gpu in particular

#

CUDA is, afaik, a different paradigm that also runs code on the GPU but isn't compute shaders and doesn't integrate into a graphics pipeline at all, unlike compute shaders

#

wgpu will let you write compute shaders in WGSL (which has Rust-flavored syntax) or other shading languages and translate them as needed, then use them from Rust CPU-side code

compact jungle
#

oh okey this is super helpful

#

rust-gpu it is