Hacker News
Actual Curl Rewrites in Rust
viraptor
|next
[-]
"This latter one claims to have spent 8,600 USD to make it happen." - no, people use subscriptions for this, not API pricing. It's extremely unlikely someone paid more than $200.
"A Rust implementation of curl would thus still have had 67 of those vulnerabilities." - some of these could still be prevented due to more expressive language. For example https://github.com/curl/curl/commit/d37d79df1e01066417aff0a9... exists partially because someone thought full parsing and comparison in C is just hard and the alternative likely won't have issues. What are the chances the same decision would be made in Rust with much better struct/enum handling, standard library, and an Eq trait?
goodmythical
|next
|previous
[-]
curl is definitely one of those 99% invisible "so perfect I never notice it" things.
I mean, I use it. I see it pop up in dnf update, but I had no idea of the update cadence. 1,306 contributors, 99 versions, ~17k closed PRs, ~5,700 closed issues
Anyway, interesting to see "of the 81 vulnerabilities we have confirmed in curl so far during 2026, 14 were the result of mistakes that most likely would have been avoided had we used a memory-safe language such as rust. That’s 17.3%. A Rust implementation of curl would thus still have had 67 of those vulnerabilities."
fschuett
|next
|previous
[-]
And the small improvements that accumulated can be ported too, when doing Rust rewrites, I would not say that this is an argument for sticking with C per se. And 20% less vulns is still 20% less.
ahartmetz
|previous
[-]
Porting to a higher level language with 1.9x the LOC? Ew.