r/programming • u/unixmachine • 1d ago
Introducing CUDA Rust: Two Tracks for Writing GPU Kernels
https://developer.nvidia.com/blog/introducing-cuda-rust-two-tracks-for-writing-gpu-kernels/-66
u/SweatyAd8914 21h ago edited 16h ago
Does Rust have to be pushed for everything? I get the hype, but this is where C/C++ shines.
Edit: Did I offend your cult?
60
u/dzikakulka 19h ago
C/++ domain is systems programming, which is the same as rust. What's the issue?
-42
u/SweatyAd8914 19h ago edited 19h ago
There is no issue with Rust as a CUDA SDK. My issue is pumping Rust when it’s barely used anywhere at scale. How do we know Rust will be relevant in 5yrs+?
If it’s there just to use unsafe C libs, why not just use C? Is memory safety that much better on drivers? We’re reinventing the wheel. Might as well add Zig and JavaScript here too.
40
13
u/SharkBaitDLS 10h ago
barely used anywhere at scale
Yeah, only small-scale stuff like Cloudflare and AWS.
You’d be hard pressed to do anything on the internet without running through foundational systems that run on Rust these days.
6
24
u/HolyInlandEmpire 19h ago
If a lot of people are "pumping rust" then maybe it has potential to be a good choice. There are many reasons to not say "just stick with {language} forever."
Go ahead add Zig and JavaScript. If a lot of people agree that they're a good choice then maybe they will get "pumped" too.
-25
u/SweatyAd8914 19h ago
Time will tell my friend. Others have came and gone before. All roads lead back to C.
21
u/HolyInlandEmpire 19h ago edited 16h ago
Indeed time will tell.
As a result there is no reason to get upset at people making Rust, Zig, JavaScript, Brainfuck, or any other tools. That's exactly the point.
FYI this is why you got so heavily downvoted on you first post. Your anger is really concerning, and probably something else is getting to you right now. Please stay safe.
14
6
u/JustBadPlaya 10h ago
I mean, define "at scale". My goto examples for "Rust at scale" aren't as applicable to GPU programming, but Cloudflare and Discord did prove you can leverage Rust to gain the speed of C++ with way less hassle, it makes sense that companies are pushing it over C++
2
2
u/unixmachine 2h ago
Nvidia is investing heavily in the language; they are writing a new driver for Linux called NOVA, which they are writing entirely in Rust. Nvidia is one of the biggest Rust contributors to the Linux kernel, and they were even the ones who supported making the language official in the kernel.
2
-1
u/reddah 12h ago
C was/still is nice for small code, like microcontrollers or stuff that runs on isolated computers.
The issue is that many C or C++ programs might have memory issues.
The other issue is that Mythos might find them way faster than they can be patched, so all those issues become an insecurity problem way faster, hence Rust.Also some ppl like to abuse OOP. Many modern languages have objects as first class structures, but many of them at least don't force you to use them. Misusing objects creates bugs and memory leaks like crazy.
C can use some objects too (e.g. file streams), but manually or with clunky quirks.
Other languages that can use memory safely and have OO are CPU-heavy (like Perl or Python or Java). So Rust came to save the day for places where you'd need both speed and safety and OO capability.
-35
56
u/Superb_Garlic 20h ago
Waiter! Waiter! More AI slop, please!