The Ladybird web browser is porting its JavaScript engine from C++ to Rust using AI code generation tools to improve memory safety, with extensive testing to ensure identical functionality. However, the video’s host expresses concerns about Rust’s portability and the reliability of AI-generated code, questioning whether these choices are the best long-term strategy for the project.
The Ladybird web browser, originally written in C++, has begun porting parts of its codebase to Rust, with significant assistance from AI code generation tools. This decision was announced in a blog post by Andreas Kling, Ladybird’s founder, who explained that the move was motivated by the search for a memory-safe language to replace C++. While Swift was previously considered, its limited platform support and C++ interoperability issues led the team to choose Rust, which boasts a more mature ecosystem and is already familiar to many contributors. The initial focus of the port is Ladybird’s JavaScript engine, libjs, with the goal of maintaining byte-for-byte identical output between the C++ and Rust versions.
The porting process relied heavily on AI tools such as Claude, Codeium, and Codex, but was directed by a human—Andreas himself—who decided what to port, in what order, and how the Rust code should look. The AI generated code in small, manageable chunks, and multiple AI models were used to review and refine the output. In total, about 25,000 lines of Rust code were produced in two weeks, a process that would have taken months by hand. Extensive testing was conducted, including over 65,000 automated tests and lockstep browsing comparisons, to ensure the Rust implementation was functionally identical to the original C++ code, with no regressions or performance losses.
Despite the technical success of the port, the video’s host expresses strong reservations about both the adoption of Rust and the use of AI-generated code. He argues that while Rust offers memory safety and is increasingly used in projects like Firefox and Chromium, it significantly reduces portability across platforms, as Rust’s practical support is limited outside of its primary targets. The host also points out that mixing Rust and C++ increases project complexity and does not fully achieve the stated goal of memory safety, since much of Ladybird will remain in C++ for the foreseeable future.
The host further critiques the broader trend of using AI for code generation in critical software projects, citing concerns about the stability, security, and maintainability of both AI-generated code and the Rust ecosystem itself. He notes that while Ladybird’s rigorous testing sets a positive example, the rapid evolution of both AI tools and Rust makes them unstable foundations for large, long-term projects. He suggests alternatives like “Phil C,” a memory-safe C/C++ variant, as potentially better solutions for projects seeking memory safety without sacrificing portability or stability.
Ultimately, while the host respects Andreas Kling’s technical judgment and acknowledges the impressive progress of Ladybird, he remains skeptical of the strategic wisdom behind the move to Rust and AI-driven development. He emphasizes that these are reasonable engineering debates rather than ideological battles, and that Ladybird’s future success will depend on how these choices play out over time. Despite his concerns, he remains interested in following the project and encourages open discussion about the merits and drawbacks of such significant technological shifts.