|
From a PR standpoint, this page encourages the viewpoint that Rust fans are too often Rust fanatics. As for ultimate usefulness, I am not really convinced. The big selling point on Rust is no memory leaks, no use after free and so on. These issues do not exist in shaders; one cannot allocate memory in shaders really, so that point of Rush seems, well, pointless. I would also never put bounds checking into a shader either; that harms performance a great a deal. I guess if you like Rust's syntax this is a useful, though doing bits that are natural in typical Rust would likely be far from ideal on GPU code. This happens also with current shading languages too, but I strongly suspect this makes it worse. As a point against usefulness: it is somewhat useless on Apple platforms since one will need to translate into Metal (and yes, there are tools for that), but that drops so many capabilities of targeting Apple devices. Apple GPU's, because of their nature, can do things other GPU's cannot (and also the other way) and to make this useful to me (or any performance minded project that targets Apple GPUs), will require shoe-horning those features somehow into this. But I guess, it is nice for those who like the syntax of Rust (I confess I do not like Rust's syntax) and are targeting Vulkan as it gives one another shading language to write in; which I guess means a point for SPIR-V (and the interface language idea in general). |
One is an expressive type system with algebraic types and generics. It's a lot easier to produce versions of code optimized for a certain use case. Only CUDA comes close.
This brings us to the ecosystem. Outside of CUDA, how many libraries exist that can easily be used from a shader context?
Rustc has great error messages. I don't know others, but errors in OpenGL shaders make me want to flip tables.
And being able to run the same code on the CPU is valuable as well, leading to simpler testing and debugging.
So unless you like CUDA and its problems, then this is rather attractive.