Ladybird, a potential Chrome alternative, has begun migrating from C++ to Rust, successfully porting its JavaScript engine in just two weeks using AI.



The Ladybird web browser has announced that it has adopted Rust as its programming language to replace C++, and has already successfully replaced its JavaScript engine with a Rust-based one.

Ladybird adopts Rust, with help from AI - Ladybird
https://ladybird.org/posts/adopting-rust/




Many existing web browsers are based on Blink, used by Chrome, or Gecko, used by Firefox. Ladybird, on the other hand, is a web browser that uses a proprietary engine that is neither Blink nor Gecko. Development began around 2022. Initially, it was a personal project by Andreas Kling , but in July 2024, GitHub founder Chris Wanstrath funded the project with $1 million (approximately 156 million yen), establishing the Ladybird Browser Initiative. Since then, development has progressed smoothly with funding from various sources, and in October 2025, it met Apple's 'standards for alternative browser engines other than WebKit.'

Ladybird finally meets Apple's criteria for being recognized as an 'alternative browser engine' on iOS - GIGAZINE



A look at Ladybird's GitHub repository reveals that 59.8% of the project is written in C++. However, the development team has been exploring alternatives to C++ to find a more memory-safe language. Apple's Swift was also considered, but was rejected due to its 'limited support outside the Apple ecosystem.' Instead, the team decided to use Rust, which is used in Firefox and Chromium.



The first target of porting was the JavaScript engine LibJS. Kling rewrote the code written in C++ in Rust using Claude Code and Codex. Instead of inputting a few prompts and leaving all the work to the AI agent, Kling decided 'what to port,' 'in what order to port,' and 'what the final code would be,' and input hundreds of small prompts to guide the AI agent to operate properly. Also, once the porting was complete, multiple 'adversarial reviews' were performed using multiple AI models to analyze incorrect code and inappropriate patterns.

The porting work was completed in about two weeks, achieving the same functionality as the C++ version of LibJS, a task that would have taken several months if done manually.

You can see the details of the porting results at the link below. This porting was done with an emphasis on compatibility, and the code follows the C++ style rather than the Rust style. Going forward, as the team becomes more familiar with the process of 'eliminating the C++ pipeline,' the code will be simplified.

LibJS: Add Rust implementation of lexer, parser, AST, and bytecode generator by awesomekling · Pull Request #8104 · LadybirdBrowser/ladybird · GitHub
https://github.com/LadybirdBrowser/ladybird/pull/8104



The porting of C++ to Rust is considered a 'long-term side project,' and C++ will continue to be used for browser engine development. Because the order and scope of porting work needs to be carefully determined, contributors are encouraged to contact the core team before beginning the port to Rust.

in Software, Posted by log1o_hf