> Please consider not vibe coding rust as AIs are not good at writing Rust and also hire a real rust dev
Isn't the whole point of AI companies using Rust that it's explicit, safe, and AIs are fairly good at writing it?
> Please consider not vibe coding rust as AIs are not good at writing Rust and also hire a real rust dev
Isn't the whole point of AI companies using Rust that it's explicit, safe, and AIs are fairly good at writing it?
AI is not good at writing Rust. The ways in which it is bad vary from writing code that just looks off to actually not working. I do not use unsafe frequently so cannot comment on this particular scenario but I have seen similar stuff often, most Rust code that I read from AIs has at least one or two issues.
In particular, if you have a situation that requires any kind of conceptual understanding then AI will likely have issues. Sync blocking async is the classic example. My theory is that humans make this worse because they will often prompt in a certain direction and AI will faithfully build the footgun.
I haven't experienced these issues with latest models writing performant and correct rust fwiw. It does seem to understand Rust's safety concepts quite well when working on reviewing or writing code
I suspect "Rust is fast/low memory utilization" is the more common value proposition, with memory safety as the bonus that can push it over other fast languages.
Related: If AI writes your code, why use Python? (which notes why Rust has taken off for LLMs) https://news.ycombinator.com/item?id=48100433
Zig is every bit as fast with typically even lower memory footprint as Rust. The main thing Rust promises that Zig cannot already do natively is memory safety. This is not about Python vs Rust. It is one systems language vs another.
This Rust rewrite instance is explicitly about memory safety by admission of the devs; I was just commenting on the trend.