Skip to main content
Original: Simon Willison · 23/02/2026

Summary

Ladybird transitioned from Swift to Rust for their JavaScript engine, utilizing AI tools for an efficient porting process with zero regressions.

Key Insights

“The requirement from the start was byte-for-byte identical output from both pipelines.” — Discussing the goal of the Rust porting process.
“The result was about 25,000 lines of Rust, and the entire port took about two weeks.” — Highlighting the efficiency of the AI-assisted coding process.
“Having an existing conformance testing suite of the quality of test262 is a huge unlock for projects of this magnitude.” — Emphasizing the importance of robust testing in the porting process.

Topics


Full Article

23rd February 2026 - Link Blog Ladybird adopts Rust, with help from AI (via) Really interesting case-study from Andreas Kling on advanced, sophisticated use of coding agents for ambitious coding projects with critical code. After a few years hoping Swift’s platform support outside of the Apple ecosystem would mature they switched tracks to Rust their memory-safe language of choice, starting with an AI-assisted port of a critical library: Our first target was LibJS , Ladybird’s JavaScript engine. The lexer, parser, AST, and bytecode generator are relatively self-contained and have extensive test coverage through test262, which made them a natural starting point. I used Claude Code and Codex for the translation. This was human-directed, not autonomous code generation. I decided what to port, in what order, and what the Rust code should look like. It was hundreds of small prompts, steering the agents where things needed to go. […] The requirement from the start was byte-for-byte identical output from both pipelines. The result was about 25,000 lines of Rust, and the entire port took about two weeks. The same work would have taken me multiple months to do by hand. We’ve verified that every AST produced by the Rust parser is identical to the C++ one, and all bytecode generated by the Rust compiler is identical to the C++ compiler’s output. Zero regressions across the board. Having an existing conformance testing suite of the quality of test262 is a huge unlock for projects of this magnitude, and the ability to compare output with an existing trusted implementation makes agentic engineering much more of a safe bet.

An AI agent coding skeptic tries AI agent coding, in excessive detail

Simon Willison · explanation · 63% similar

LadybirdBrowser/ladybird: Abandon Swift adoption

Simon Willison · explanation · 58% similar

AI should help us produce better code - Agentic Engineering Patterns

Simon Willison · how-to · 56% similar