PARAS MADAN
All writing

Latest in AI

AI-Written curl Rewrites: What to Check Before Replacing libcurl

Rust rewrites can match impressive test suites, but compatibility depends on the baseline, backend and update process your application actually needs.

AI-written Rust rewrites of curl are prompting a practical question: when is a replacement ready for an application that already depends on libcurl? A passing test suite is useful evidence, but it does not establish compatibility with every build, current upstream fixes or your production workload.

In his November 17 response, curl maintainer Daniel Stenberg focused on maintenance: upstream kept changing while the rewrites were being built. That is the right starting point for an adoption review. Ask what was matched, when it was matched and how future changes will reach you.

Separate the command-line tool from the library

The kov/curl rewrite says it produces a curl command-line tool, a compatible libcurl.so.4 and a Rust API. Those are three different adoption surfaces. Its maintainer says Claude wrote the implementation under human direction and review; I have not built or independently tested it.

A script that invokes curl needs the expected flags, output and exit codes. An existing binary linked to libcurl also needs the right exported symbols, layouts and calling behavior. A new Rust application has another choice: adopting a Rust-facing API without replacing the system library at all.

Write down which surface you need before comparing results. A successful command-line download is not evidence that an application's callbacks, connection reuse or asynchronous transfer handling work unchanged.

Read the denominator behind a compatibility claim

The urlx README reports 1,300 passing curl tests, alongside skipped and permanently excluded cases. It separately labels HTTP/3 as untested. Its headline pass rate therefore needs the surrounding scope to mean anything useful.

The kov/curl project uses C and Rust builds from the same reference tree for comparison and documents exceptions and intentional divergences. That gives a reviewer a more specific question than whether the percentage looks impressive: does the reference tree and configuration match what you run?

I would request a small evidence table before a trial:

Review questionEvidence to record
Which behavior is being matched?Upstream revision and rewrite revision
Which build was tested?OS, architecture, TLS and resolver configuration
What did not run?Skipped tests, exclusions and reasons
What intentionally differs?Documented divergence and its regression test
What does the application need?Its actual protocols, options and integration tests

Treat an unexplained exclusion as an unanswered question, not automatically as either a defect or a harmless exception.

Match the backend before comparing outcomes

A language change can arrive with a dependency change. urlx uses Rustls by default, while kov/curl documents multiple TLS configurations and other selectable backends. Comparing two binaries without recording those choices can hide why certificate handling or a transfer behaves differently.

For a first evaluation, I would select one representative application and reproduce its build configuration as closely as possible. Include a normal transfer, an expected authentication failure, a redirect, a timeout and any proxy path the application actually uses. Check error handling and downstream behavior, not only whether the response body arrived.

These are proposed acceptance tests, not results from testing either rewrite. Keep them isolated from production credentials and traffic until the dependency has passed your normal review.

Review security changes by behavior, not language label

The official curl vulnerability index links individual advisories and affected version ranges. Use those records to ask whether a relevant behavior exists in the replacement and what evidence demonstrates its handling.

Do not copy curl's vulnerability count onto a rewrite, or assume every listed issue disappears because the replacement uses Rust. A different implementation needs its own analysis. Authentication state, redirect policy and trust decisions deserve review alongside memory handling.

Decide who owns the second release

Before adoption, name the person who will monitor upstream changes, review the replacement's fixes and decide when to upgrade. Ask for a documented security-reporting route and a reproducible release process. Then keep the original dependency available for rollback during a narrowly scoped trial.

I would not replace a machine's system libcurl just to evaluate a promising README. Start with one application in an isolated environment. The decision becomes stronger when you can explain both why that application works today and how you will keep it working after the next upstream fix.

I'm Paras. I work at the intersection of AI, engineering and distribution.

I help developer-tool teams turn technical claims and adoption tradeoffs into clear, credible stories.

Book a 30-minute call.