Actual Curl Rewrites in Rust daniel.haxx.se · 13 points · 3 comments · HN thread...
HN Best 200 @best
Actual Curl Rewrites in Rust daniel.haxx.se · 13 points · 3 comments · HN thread
TL;DR Daniel Stenberg, curl's lead maintainer, responds to two recent AI-assisted projects that rewrote curl and libcurl in Rust, one of which claims to have cost 8,600 USD. He argues that copying the code is the easy part, that curl's value lies in its years of fixes, community and ABI stability, and that a Rust version would still have had 67 of the 81 vulnerabilities confirmed so far in 2026. He says he does not believe in rewrites and is more amused and puzzled than hostile.
- Two Rust rewrites of curl appeared in 2026: urlx, described as a from-scratch memory-safe reimplementation, and a later project reusing the curl name, which claims 8,600 USD of spend.
- The rewrite converted about 185,000 lines of C into about 340,000 lines of Rust; Stenberg notes that AI agents could do this because curl is well documented, widely used and heavily tested.
- In just over three weeks the real curl project merged over 300 commits and fixed a little over 200 bugs, plus a few vulnerabilities, which the rewrites lack.
- Of 81 vulnerabilities confirmed in curl in 2026, 14 (17.3%) stemmed from mistakes a memory-safe language likely would have prevented, leaving 67 that a Rust version would still have had.
- Stenberg says he does not believe in rewrites and favors continuous polishing and refactoring, and he has not contacted the people behind the projects.
Discussion The thread is short and mostly friendly. One commenter is impressed by how much activity sits behind curl (contributor, release and PR counts) and says they had never noticed how often it is updated. Another argues the language choice matters beyond vulnerability counts, citing Rust's portable build and easy library composition versus C's Makefile burden, while accepting that a 20% reduction in vulnerabilities is still meaningful. A reply points out that libcurl is already installed on most systems, so there is little need for a replacement.
- Rust's tooling and portability matter beyond vulnerability counts (some): A commenter says Rust compiles anywhere, including WASM, and makes combining libraries easy, which C's build tooling does not. They see a Rust rewrite as reasonable even though the security gain is partial.
- Memory-safety gains are still worth having (some): The 20% of vulnerabilities attributed to memory errors is treated as a real reduction, and small improvements accumulated in the C code could be ported.
- curl is already so widespread that replacing it is pointless (a few): A reply notes that libcurl is trivial to use and usually already installed through the distribution, so a rewrite offers little practical benefit to most users.
- Surprise at how actively curl is maintained (a few): One commenter admits they had no idea of curl's release cadence or the size of its contributor base, which they cite from the article and project statistics.