4 ms·
Why am I hearing about Rust a lot these days? Did anything significant happen?
by system2 7mo ago
Why am I hearing about Rust a lot these days? Did anything significant happen?
- iFire 7mo agoMost of the platforms were successfully petitioned to have rust sdk mandatory added so that rust code can be added to the platforms. The previously situation was rust was not allowed because the external dependency of the rust sdk was blocked. Note that the rust having no stable api is not fixed, so I think there's a bunch of internal systems on each platform to hard lock the rust dependencies across multiple rust users. There's some friction between platform packagers and the code that the author wrote exactly as it was written.
- canadiantim 7mo agoAI has made it exceptionally easy to program with. I've switched to using Rust from Python simply because of AI development
- system2 7mo agoReally? You think AI writes better Rust than Python? Can you give me some examples? I strictly code Django, and Claude Code is really good at following my lead with it.
- mikepurvis 7mo agoI think the argument is more that working rust code is better than working Python, and AI assistance makes it more tenable for average developers to successfully produce working rust code, and in particular is helpful for navigating the gap between "code written" and "code compiling" (eg why is the borrow checked mad at me).
- theLiminator 7mo agoI think relative to the typical Rust code it likely does worse than AI relative to the typical Python code. But due to the compiler, it's possible you might get more correctness out of AI-generated rust code on average.
- ChadNauseam 7mo agoThe compile errors are great. I can change one function signature and have my output fill up with compile errors (that would all be runtime errors in python). Then I just let claude cook on fixing them. Any time you have to run your program and tell claude what’s wrong with it you’re wasting time, but because claude can run the compiler itself and iterate it’s much more able to complete a task without intervention.
- system2 7mo agoActually, I noticed it with C compiling. Compiler errors made it faster to debug the code.
- xcrjm 7mo agoEven if it writes the same or even somewhat worse rust than python, assuming the output is the same you are likely to get a speedup + a better distribution story.
- the_duke 7mo agoRust has a very strict type system and an ecosystem that often utilizes the type system well. Many things that would only be caught at runtime in other languages are caught at compile time in Rust, making coding agents iterate until things compile and work well. Rust also has great error messages, which help the agents in fixing compilation errors.
- mr_mitm 7mo agoThe mandatory error handling of Rust is also an amazing feature for catching bugs at compile time. In Python you never know which exceptions might occur at any given time. That's something I completely underestimated in its usefulness, especially now that I have a programming buddy with infinite stamina handling all these errors for me.
- staticassertion 7mo agoI can't give you examples, but my experience is that AI does very well with Rust except for cases where a library has a constantly changing API/ has had recent breaking changes. I find that AI does extremely well at "picking up" a Rust codebase, I suspect due to the type information providing context but I couldn't say.
- bitwize 7mo agoIndeed. With AI lifting legacy code bases into Rust got a whole lot easier, and purging the blight of C from the world, excepting the most deeply embedded of applications, got a whole lot closer.
- lelanthran 7mo ago> With AI lifting legacy code bases into Rust got a whole lot easier, and purging the blight of C from the world, excepting the most deeply embedded of applications, got a whole lot closer. You probably don't realise this, but AI written Rust (or any language) will have much more undefined behaviour than human-written C. AI coding brings non-determinism to every language; with AI, now every language can have Undefined Behaviour.
- Sytten 7mo agoFrom my experience at our startup, AI is still pretty shit at Rust. It largely fails to understanding lifetime, Pin, async, etc. Basically anything moderately complex. It hallucinates a lot more in general than JS for comparable codebase size (in the 250k lines range).
- mr_mitm 7mo agoAre hallucinations in code generation still a problem? I thought with linters, type checkers, and compilers especially as strict as Rust, LLM agents easily catch their own mistakes. At least that's my experience: the agent writes code, runs linters and compilers, fixes whatever it hallucinated, and I probably get a working solution. I tell it to write unit tests and integration tests and it catches even more of its own mistakes. Not saying that it will always produce code free of bugs, but hallucinations haven't been an issue for me anymore.
- Jaxan 7mo agoWhat do you mean by “these days”? To me, it seems like rust is a pretty constant factor on HN for at least two years now.
- oconnor663 7mo agoIt feels to me like Rust has been pretty big on HN ever since the 1.0 release in 2015...
- weaksauce 7mo agothere has been a few adopters of rust... linux formally choosing it for some of their systems being the most notable recently(maybe a few months ago).