rust-gpu VS DirectXShaderCompiler

Compare rust-gpu vs DirectXShaderCompiler and see what are their differences.

rust-gpu

πŸ‰ Making Rust a first-class language and ecosystem for GPU code 🚧 (by EmbarkStudios)

DirectXShaderCompiler

This repo hosts the source for the DirectX Shader Compiler which is based on LLVM/Clang. (by microsoft)
Our great sponsors
  • Nanos - Run Linux Software Faster and Safer than Linux with Unikernels
  • Scout APM - A developer's best friend. Try free for 14-days
  • SaaSHub - Software Alternatives and Reviews
rust-gpu DirectXShaderCompiler
19 5
3,707 1,959
3.9% 2.5%
9.4 9.3
3 days ago 1 day ago
Rust C++
GNU General Public License v3.0 or later GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

rust-gpu

Posts with mentions or reviews of rust-gpu. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-10-04.
  • What's everyone working on this week (40/2021)?
    reddit.com/r/rust | 2021-10-04
    Another aspect of writing code for GPUs are the shaders, the code that gets executed in the GPU. These can be written in CUDA C (for CUDA), OpenCL C (for OpenCL), GLSL (if using graphic/compute APIs such as OpenGL), etc. Rust can be used for this purpose too, thanks to rust-gpu, but it is a bit more complex to get started.
  • Unified Shader Programming in C++
    news.ycombinator.com | 2021-10-03
    Rust also has this, from what I understand:

      https://github.com/EmbarkStudios/rust-gpu
  • Is there a crate for CPU/GPU agnostic code in Rust (like Kokkos for C++)
    reddit.com/r/rust | 2021-09-29
  • What's the current state of GPU compute in rust?
    reddit.com/r/rust | 2021-09-20
    Working on autograph, for machine learning and neural networks. Unlike CUDA / HIP it's threadsafe, but doesn't expose low level things like multiple streams. Most of the shaders are glsl but I'm now using rust_gpu for pure rust gpu code.
  • I wanted to share my experience of Rust as a deep learning researcher
    reddit.com/r/rust | 2021-09-01
    For this, I'm hoping these folks will nail it soon https://github.com/EmbarkStudios/rust-gpu
  • Man, building a game sure takes a long time
    reddit.com/r/gamedev | 2021-07-07
    That's a good point. I'm interested in projects like Rust GPU for this sort of thing. Should make it easy enough to actually unit test your shaders.
  • 32bit indexing in 64bit again - GPUs
    reddit.com/r/rust | 2021-06-28
    Proposing a function like std::index_32, to improve a performance problem which may or may not exist, on a class of platforms which aren't supported (and on which Rust currently barely compiles), because Rust might become popular on those platforms in the future... you could try it, but I think your proposal would have a very low chance of being accepted. The starting point is here.
  • Announcing neuronika 0.1.0, a deep learning framework in Rust
    reddit.com/r/rust | 2021-06-15
    there is the rust-gpu effort, an alternative to OpenCL https://github.com/EmbarkStudios/rust-gpu
  • Is cuda all written in C++ why not RUST?
    reddit.com/r/CUDA | 2021-06-04
  • Rust-GPU: Making Rust a first-class language and ecosystem for GPU code
    news.ycombinator.com | 2021-06-04

DirectXShaderCompiler

Posts with mentions or reviews of DirectXShaderCompiler. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-03.
  • What HLSL->SPIR-V compiler to use?
    reddit.com/r/vulkan | 2021-04-03
    From what I can tell, both glslang/shaderc and Microsoft's DirectXShaderCompiler can compile HLSL to SPIR-V code. Is there a consensus on which of these is the better compiler? (wrt to accuracy, optimisations, feature completeness, etc.)
    reddit.com/r/vulkan | 2021-04-03
    OOP features. HLSL has support for C++ like structs and classes that contain not just data but also methods. This is pretty much just syntactic sugar as it compiles down to flat functions that just take the object as the first parameter, but it might result in cleaner code. What was more useful were interfaces with which you could have some form of polymorphism, but it seems like dxc has cut that feature - https://github.com/microsoft/DirectXShaderCompiler/issues/395. I found it to be useful to define a BRDF in PBR shader code as an interface. That way I could have common lighting code, while also allowing the individual shaders to choose any BRDF they want by simply passing a different implementation, which the lighting code would then call its methods of. This still compiled down to flat code since it's all resolved statically.
  • Bye bye shaderc!
    reddit.com/r/rustjerk | 2021-04-01
    Most games today write in HLSL first. This allows them to target DirectX (+XBox), and PS4, right away. If they also want to run on Vulkan, they use DXC to produce SPIR-V. Again, this is what people use today and put the money behind, not the GLSL->SPIRV path.
  • AAA games being ported to m1 Mac?
    reddit.com/r/macgaming | 2021-03-19
    This is definitely outside my area of expertise, but looking at the spec of the HLSL IR ( https://github.com/microsoft/DirectXShaderCompiler/blob/master/docs/DXIL.rst#shader-resources ) seems to suggest that type information is included or each resource binding. I imagine is has to, because it’s probably essential for final compilation (you need to know how to interpret the resource if you want to do data fetch - buffers and textures have different layouts).
  • Help First Time Using Xenia
    reddit.com/r/xenia | 2021-02-19
    w> 00001924 Failed to load dxcompiler.dll, converted DXIL disassembly for debugging will be unavailable - if needed, download the DirectX Shader Compiler from https://github.com/microsoft/DirectXShaderCompiler/releases and place the DLL in the Xenia directory

What are some alternatives?

When comparing rust-gpu and DirectXShaderCompiler you can also consider the following projects:

are-we-learning-yet - How ready is Rust for Machine Learning?

wgpu-rs - Rust bindings to wgpu native library

shaderc - A collection of tools, libraries, and tests for Vulkan shader compilation.

wgpu - Safe and portable GPU abstraction in Rust, implementing WebGPU API.

crates.io - Source code for crates.io

hash-shader - SHA256 Compute Shader (Kernel) Written in Rust

conan-center-index - Recipes for the ConanCenter repository