Personal preference of the author, he made at least one video on YouTube on why he dislikes Rust. I think he finds it too cumbersome and not worth it when the software isn't security-critical (not that I agree, just reporting what IIRC his stance is).
Antirez has been writing C for a million years so is much more familiar with it than Rust.
Also the goal of the project is to squeeze the absolute maximum performance and capability possible out of limited hardware resources (compared to clusters of B200s or something).
Does Rust even give you good access to low-level code on different platforms? And if so, how much extra work do you need to do to make it acceptable to the compiler? And is that work worthwhile if you are not going to get the security guarantees of normal Rust code? Is it a worthwhile tradeoff when the goal is performance?
Those are real questions by the way, not rhetorical. If Rust could work well for this type of project then I would like to know.
Yes, Rust gives you great access to low-level code on different platforms, including SIMD. It is also alias-free by default, and gives you excellent primitives to write multi-threaded code with compile-time correctness guarantees, which is how projects such as zlib-rs end up significantly faster than their C counterparts.[1]
It's about as good as it can get for this kind of code.
> Antirez has been writing C for a million years so is much more familiar with it than Rust.
This is explicitly an AI-coded project, Antirez argues that LLMs are worse at writing Rust than C because so much high quality systems code (think e.g. sendmail) that ends up in AI training sets is C, not Rust. Another related argument is that the more detailed syntax and compiler feedback found in Rust compared to C are really a negative for LLM workflows.
There's plenty of room to disagree wrt. this of course: without the strong typing checks of Rust around e.g. indirect references, safety and correctness ends up being a global property in typical C programs, and LLMs are terrible wrt. reasoning about global properties. You're better off forcing them to adapt to a different local syntax that does a more complete job of enforcing modularity, since this is comparatively foolproof.
He recently said that he finds Rust less ergonomic and that this also affects code written by LLMs, which he thinks excel at writing C partly because of the enormous, high-quality codebase they were trained on. He sees security-critical code as a reason to choose Rust.
The video is in Italian but has an auto-dubbed English audio track:
<a href="https://www.youtube.com/watch?v=sOt0WpQG5eU\&t=526s" rel="nofollow">https://www.youtube.com/watch?v=sOt0WpQG5eU\&t=526s
So if LLMs can write C really "well" - as in they can keep track of all the memory allocations, branches and conditions that would prevent the typical memory problems associated with C...then do we even need Rust anymore? The control of the memory allocations and layout in C does theoretically mean you can ultra-optimise the code. The LLMs can write 1000s of unit tests and they're really good at fuzzing.
I don't know Rust well enough to understand what else it would provide over the safe memory guarentees?
> So if LLMs can write C really "well" - as in they can keep track of all the memory allocations, branches and conditions that would prevent the typical memory problems associated with C...then do we even need Rust anymore? The control of the memory allocations and layout in C does theoretically mean you can ultra-optimise the code. The LLMs can write 1000s of unit tests and they're really good at fuzzing.
If.
(Mind you, fuzzing a program with any non-trivial input space can only ever prove that it is unsound. It can never prove that the program is sound.)
pulkitsh1234 · · focus · HN ↗
GTP · · focus · HN ↗
ilaksh · · focus · HN ↗
Also the goal of the project is to squeeze the absolute maximum performance and capability possible out of limited hardware resources (compared to clusters of B200s or something).
Does Rust even give you good access to low-level code on different platforms? And if so, how much extra work do you need to do to make it acceptable to the compiler? And is that work worthwhile if you are not going to get the security guarantees of normal Rust code? Is it a worthwhile tradeoff when the goal is performance?
Those are real questions by the way, not rhetorical. If Rust could work well for this type of project then I would like to know.
Aeolos · · focus · HN ↗
It's about as good as it can get for this kind of code.
[1] <a href="https://www.reddit.com/r/rust/comments/1ixt1ei/zlibrs_is_faster_than_c_trifecta_tech_foundation/" rel="nofollow">https://www.reddit.com/r/rust/comments/1ixt1ei/zlibrs_is_fas...
zozbot234 · · focus · HN ↗
This is explicitly an AI-coded project, Antirez argues that LLMs are worse at writing Rust than C because so much high quality systems code (think e.g. sendmail) that ends up in AI training sets is C, not Rust. Another related argument is that the more detailed syntax and compiler feedback found in Rust compared to C are really a negative for LLM workflows.
There's plenty of room to disagree wrt. this of course: without the strong typing checks of Rust around e.g. indirect references, safety and correctness ends up being a global property in typical C programs, and LLMs are terrible wrt. reasoning about global properties. You're better off forcing them to adapt to a different local syntax that does a more complete job of enforcing modularity, since this is comparatively foolproof.
cuttothechase · · focus · HN ↗
Much easier to work with a language you are most comfortable with right?
simoiacos · · focus · HN ↗
The video is in Italian but has an auto-dubbed English audio track: <a href="https://www.youtube.com/watch?v=sOt0WpQG5eU\&t=526s" rel="nofollow">https://www.youtube.com/watch?v=sOt0WpQG5eU\&t=526s
wg0 · · focus · HN ↗
I like C's simplicity so much. The only other language that comes close in simplicity and minimalism is go.
Flere-Imsaho · · focus · HN ↗
I don't know Rust well enough to understand what else it would provide over the safe memory guarentees?
zozbot234 · · focus · HN ↗
If.
(Mind you, fuzzing a program with any non-trivial input space can only ever prove that it is unsound. It can never prove that the program is sound.)