A write-once-run-anywhere GPGPU library for Rust that abstracts WebGPU for CUDA-like compute with portability across desktop, mobile, and browser.
Emu is a GPGPU library for Rust that provides a CUDA-like compute abstraction over WebGPU, enabling portable GPU acceleration across multiple platforms including DirectX, Metal, Vulkan, and eventually OpenGL and browsers. It focuses on portability, modularity, and performance, allowing developers to offload heavy computations to user devices to reduce latency and improve privacy.
Rust developers working on compute-intensive applications who need cross-platform GPU acceleration, such as those building scientific simulations, data processing pipelines, or graphics tools that require CUDA-like ergonomics without being locked to specific hardware.
Developers choose Emu for its unique combination of CUDA-like ergonomics with full WebGPU transparency, enabling zero-overhead interop with graphics and custom caches, alongside asynchronous execution and automatic device management for ease of use.
The write-once-run-anywhere GPGPU library for Rust
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses WebGPU to support DirectX, Metal, Vulkan, and more, enabling GPU acceleration across desktop, mobile, and eventual browser platforms, as highlighted in the README's overview.
Provides DeviceBox<T> for type-safe GPU data and DevicePool for automatic device management, making compute easier for developers familiar with CUDA, as described in the features section.
Allows zero-overhead interop with raw WebGPU constructs, enabling mixing with graphics or customizing caches and compilers, mentioned in the transparency feature.
Most operations are non-blocking with synchronization via DeviceBox::get, improving performance by allowing concurrent execution, as stated in the async API description.
At version 0.1.1 with high-priority todos like ensuring correct WebGPU polling and adding WASM support, Emu may have instability and missing features, as noted in the contributing section.
Requires handling asynchronous Rust with futures and executors, which adds boilerplate and potential bugs, as shown in the example where blocking is needed for execution.
Currently focuses on GLSL with restrictions for compute-only use, and support for WGLSL is a future enhancement, which may not suit developers preferring other shader languages or mixed workloads.