Porting the JS parser to Rust and adopting Rust in other parts of the engine while continuing to use C++ heavily is unlikely to make Ladybird meaningfully more secure. Attackers are surprisingly resilient to partial security.
Ladybird adopts Rust, with help from AI
251–260 of 731 posts
Re: Ladybird adopts Rust, with help from AI
#252Earlier quoted context omitted.
So Swift didn't turned out like they imagined and Rust is just the next best alternative to that failed vision using Swift. So far this is the first and only shift
They were doing their own custom language before Swift.
> The browser and libraries are all written in C++. (While our own memory-safe Jakt language is in heavy development, it’s not yet ready for use in Ladybird.)
https://awesomekling.github.io/Ladybird-a-new-cross-platform...
only thing I could find - has it been actually used in Ladybird after all?
Re: Ladybird adopts Rust, with help from AI
#253This will be another bad decision just like with Swift. From what I heard, Rust is notoriously bad at letting people define their own structure and instead beats you up until you satisfy the borrow checker. I think it'll make development slow and unpleasant. There are people out there who enjoy that, but it's not a fit for when you need to deliver a really huge codebase in reasonable time. I remember Andreas mentioni…
Nobody uses D
Re: Ladybird adopts Rust, with help from AI
#254Earlier quoted context omitted.
Of course there are tools focusing on this. It takes a little getting used to how prevalent it is. My editor now can anticipate the next three lines of code I intend to write complete with what values I want to feed to the function I was about to invoke. It all shows up in an autocomplete annotation for me. I just type the first two or three characters and press tab to get everything exactly how I was about to type i…
To be honest, I'm not quite sure what the ideal UX looks like yet. The AI assisted autocomplete is too little, but the idea of saying "Build X for purpose Y" is too high-level. Maintaining Markdown documents that the AI implements, also feels too high-level, but letting the human fully drive the implementation probably again too low-level. I'm guessing the direction I'd prefer, would be tooling built to accept and be…
Re: Ladybird adopts Rust, with help from AI
#255I hope that this opens the door for collaboration between Ladybird and Servo, no need to reinvent the wheel for core components.
Re: Ladybird adopts Rust, with help from AI
#256Re: Ladybird adopts Rust, with help from AI
#257I'm a long-time Rust fan and have no idea how to respond. I think I need a lot more info about this migration, especially since Ladybird devs have been very vocal about being "anti-rust" (I guess more anti-hype, where Rust was the hype). I don't know if it's a good fit. Not because they're writing a browser engine in Rust (good), but because Ladybird praises CPP/Swift currently and have no idea what the contributor's…
I'd argue Ladybird itself is a "hype" project.
Re: Ladybird adopts Rust, with help from AI
#258Re: Ladybird adopts Rust, with help from AI
#259> 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. After the initial translation, I ran multiple passes of adversarial review, asking different models to analyze the code for mistakes and bad patterns.…
I had a script in another language. It was node, took up >200MB of RAM that I wanted back. "claude, rewrite this in rust". 192MB of memory returned to me.
Re: Ladybird adopts Rust, with help from AI
#260Earlier quoted context omitted.
This is the famous trap that Joel on Software talked about in a blog post long time ago. If you do a rewrite you essentially put everything else on halt while rewriting. If you keep doing feature dev on the old while another "tiger team" is doing the rewrite port then these two teams are essentially in a race against each other and the port will likely never catch up. (Depending on relative velocities) Maybe they thi…
Nearly 26 years ago! https://www.joelonsoftware.com/2000/04/06/things-you-should-... What's different today really is the LLMs and coding agents. The reason to never rewrite in another language is that it requires you to stop everything else for months or even years. Stopping for two weeks is a lot less likely to kill your project.