What's the current state of GPU compute in rust?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ocl

    OpenCL for Rust

  • If you prefer an open alternative to CUDA, there are complete, easy to use und well documented bindings for opencl: https://github.com/cogciprocate/ocl/

  • blub

    3D fluid simulation experiments in Rust, using WebGPU-rs (WIP)

  • Crates for OpenCL and CUDA APIs are generally lagging behind in feature support. I think we are still long way from seeing v1.0+ releases on those. One of the most active ones in recent development has been opencl3 crate. Then, there are also some examples like blub using compute shaders with wgpu crate.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • wgpu

    Cross-platform, safe, pure-rust graphics api.

  • Crates for OpenCL and CUDA APIs are generally lagging behind in feature support. I think we are still long way from seeing v1.0+ releases on those. One of the most active ones in recent development has been opencl3 crate. Then, there are also some examples like blub using compute shaders with wgpu crate.

  • autograph

    Machine Learning Library for Rust

  • 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.

  • rust-gpu

    🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧

  • 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.

  • RustaCUDA

    Rusty wrapper for the CUDA Driver API

  • I think at the moment the I would use https://github.com/bheisler/RustaCUDA/ and C/C++ `.cu` files with `extern "C"` to call from Rust. Even though there are experiments to have nvptx as a compilation target for Rust.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts