Single-source pure-Rust heterogeneous GPU compute platform - enkiruntime/enki
1 comment
enki is a project that I developed to fix one problem (GPU programming hell)
when i first started programming with OpenGL (and later Vulkan) i was really shocked by the amount of pain and Boilerplate code required just to run a single triangle or a basic matmul, and that because i was coming from CPU language (C# and later rust), i assumed the experience would be the same, but it was really frustrating to see the actual reality (and i don't need to talk about it).
so i tried to forget about it and just accept it. after more than a year, I was building my game engine using vulkan, During that time i created an internal library called "utu" to help me abstract vulkan Boilerplate code, during that time an idea has clicked "why don't i try to fix the main problem my self?", utu was the main driver for this idea, so i threw away all the code and decided to focus on a single goal and it's to make my first expectation of the GPU world come true "Writing cpu code and run it on the GPU", now after a lott of pain building this project i finally did it, using rust bitcode (.bc llvm ir) that has the same logic of the user kernel (the nam function), then compile it to spir-v (and that was the most painful thing to do, i called the compiler "parsu"). now we can use crates.io & iters & enums & generics directly inside the kernel and it will run on the GPU! want to run it on the CPU? because it's a native rust syntax and version (stable rust) it would run on the CPU natrully without touching the code.
Read the full thread on Hacker News →
Related stories
- Hacker News · 2 points · 1 day ago
- Lobsters · 13 points · over 2 years ago
- Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022opensource.googleblog.comLobsters · 81 points · over 3 years ago
- rust-glancer: An alternative LSP for Rust with focus on low memory usagerust-glancer.github.ioLobsters · 25 points · about 1 month ago
- into_rust(): screencasts for learning Rustintorust.comLobsters · 19 points · almost 9 years ago
- Hacker News · 8 points · 5 days ago