Login
You're viewing the functional.cafe public feed.
  • Nov 17, 2026, 7:47 AM

    Here’s @bagder on LLM-powered rewrites.

    During the time these agents converted 185,000 lines of C code into 340,000 lines of Rust code (I counted), we merged over 300 commits in the actual curl project. We actually improved curl during these a little more than three weeks. A little over 200 bugfixes actually. 200 bugfixes that none of those rust rewrites have. We also fixed a few vulnerabilities. In another month we have done another 200 and maybe fixed a few more vulnerabilities. Will these clones keep up?

    As always, bagder makes the point with data. Curl is valuable because of the maintenance effort that goes into it every day.

    daniel.haxx.se/blog/2026/11/17

    💬 4🔄 105⭐ 127

Replies

  • Nov 17, 2026, 8:42 AM

    @samir @bagder also love these zingers

    there are hundreds of existing open source application using its API and there are thousands of test cases to verify the implementation.

    The C code sits there and all the AI needs to do is convert it to rust, then polish until the tests work.

    And the note that only 13% of the security vulnerabilities were connected to memory safety. So the ruat version still has 87% of the vulnerabilities. 🤷‍♂️

    I don't know if would go so far as "not rewriting anything", but I definitely think curl is on the list of things that are not worth rewriting in rust. So much of the important code on the project is the tests, the verification support, the build infrastructure for every platform. Introducing Rust doesn't make any of that better.

    It reminds me of this great talk from Richard Hipp regarding SQLite. It makes it obvious how little of this benefits from AI manipulation or language switching.

    💬 0🔄 0⭐ 2
  • 💬 0🔄 0⭐ 0
  • Nov 17, 2026, 8:48 AM
    @samir @bagder Curl can also boast of being implemented in something that actually has a usable specification (a standard, in fact).

    Let them reimplement it, without slop, in Ada or SPARK and then I might care.
    💬 1🔄 0⭐ 0
  • Nov 17, 2026, 9:55 AM

    @lispi314 @bagder I am personally fine with Rust not having a standard, but I can see why you’d hold to this principle. Perhaps it’s especially important for infrastructure such as curl.

    💬 0🔄 0⭐ 0
  • Nov 17, 2026, 9:37 AM

    @samir @bagder Around 2015 a major C++ project began a manual rewrite in Rust and the LoC of the result was vastly reduced (from memory to a fraction like 20%). One of the best things you can do to improve a codebase is shrink it. Increasing it as reported here makes it less reliable and harder to maintain, and that's really bad.

    💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 2🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0
  • 💬 0🔄 0⭐ 0