Enki
Pure-Rust Heterogeneous GPU Compute Platform
Write standard, idiomatic Rust functions and run them natively on your CPU, or compile them just-in-time directly onto GPU silicon.
No Nightly toolchain required. No foreign shading languages. No descriptor set juggling.
"Well basically, if you know Rust, you know Enki."
You don't need to learn WGSL, GLSL, mojo, or CUDA. Enki bridges the gap between systems programming and graphics hardware. If you understand Rust's references (
&T,&mut T), slices (&[T]), atomics, and pattern matching, you already know how to write high-performance GPU kernels.
Quick Start
Add Enki and your favorite math library to your project:
Paste this into your main.rs:
use *;
use ;
const N: usize = 5;
// Define a function once with #[nam]
Run it:
Note: On your first build, Enki will ask you if you want to automatically configure --emit=llvm-bc in .cargo/config.toml, If Y is entered, Enki will automatically configure .cargo/config.toml
Note: If parsu compiler toolchain is missing, Enki will ask you if you want to install it automatically. if Y is entered, enki will automatically install it via GitHub Release.
Key Highlights
- Runs on Stable Rust: No pinned nightly toolchains, forks, or broken compiler plugins.
- The GPU BorrowEngine: Extends Rust's ownership model to parallel hardware. Prevents spatial collisions, slice overlaps, and temporal data hazards before commands hit the wire.
- Direct Crate Integration: Use crates like
glamand algebraic types directly inside your kernels. - Bindless by Default: Built on Vulkan 1.3 64-bit Buffer Device Addresses (BDA) and Timeline Semaphores. Zero descriptor set management.
- Automatic Synchronization: Automatic pipeline barrier generation via a Transitive Reduction Solver (TTRD).
- Compiler-Grade Diagnostics: Beautiful, clear rustc-style error messages (
E1001-E3011) for hardware and dispatch invariant checks.
The Enki Book
Looking for in-depth guides, real-world examples, and architecture breakdowns?
---> Read The Enki Book
The book covers:
- The Mental Model: How Rust types map directly to GPU hardware.
- The BorrowEngine in Depth: Understanding spatial and temporal safety invariants.
- Interactive Graphics: Windowing, swapchains, and real-time display presentation with
flow.present().
The Journey: Why We Built Enki
For over two decades, GPU programming has been treated as an alien world. isolated languages, fragile binding tables, separate toolchains, and cryptic runtime crashes.
We asked a simple question: Why can't GPU programming feels like writing CPU code?
Enki was born to unify host and accelerator code. By leveraging LLVM bitcode generated by rustc and synthesizing hardware-optimized SPIR-V through our custom JIT pipeline (parsu), Enki gives you raw silicon throughput without sacrificing Rust’s safety and expressiveness.
Alpha Status & Licensing
Enki is currently in active Alpha and follows a sustainable open-core model designed to keep the platform free forever for independent creators while funding continuous compiler R&D:
- Open-Source Core (MIT / Apache-2.0): The user-facing API (
enki), execution engine & BorrowEngine (anu), memory manager (apsu), Vulkan windowing abstractions (utu), and procedural macros are 100% open-source and free forever. Your code and your applications belong entirely to you with zero restrictive licensing. - JIT Compiler Toolchain (
parsu): The native compilation backend is distributed as an automated, zero-setup pre-built native binary:- Free forever for individuals, students, researchers, indie developers, and non-commercial projects.
- Commercial licenses will be available for enterprises deploying Enki in production at scale.
- A Note on Safety: While Enki's
BorrowEngineand type system actively catch spatial collisions, overlapping slices, and temporal presentation hazards, it does not provide formal mathematical safety proofs. It makes parallel GPU execution dramatically safer and more intuitive than raw shaders, but it is not a formally verified sound type system. Think of it as a pragmatic, compiler-grade safety net.
Found a bug, want to stress-test the runtime, or have an idea? Please open an Issue or join the discussion!