Comment

Comment by pornel

1:1 rewrites from C are perfectly doable. You can use C FFI and rewrite function by function, bug for bug, while checking snapshot tests. I've converted a few libraries this way, before AI. I caught C bugs this way, and then was able to further refactor and improve the Rust version. In the end, I'm super happy with the results and I'm never touching autotools or cmake again!

The pool of C software worth rewriting is shrinking. There are the few too-big-to-rewrite projects that will never move, but everything else is either getting rewritten, or has more modern replacements already written directly in Rust.

I can't vouch for LLM-assisted rewrites. The results can be randomly dodgy regardless of what you're writing or rewriting. I suspect we'll get plenty more LLM rewrites anyway, and people will just compensate by sending LLMs hunting for bugs by brute force.

parent pornel 16 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton