Live data from Hacker News

Ladybird adopts Rust, with help from AI

ladybird.org

121–130 of 731 posts

Re: Ladybird adopts Rust, with help from AI

#121
post #34
post #15

> 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 am learning rust myself and one of the things I definetly didn't want to do was let Claude write all the code. But I needed guidance. I decided to create a Claude skill called "teach". When I enable it, Claude never writes any code. It just gives me hints - progressively more detailed if I am stuck. Then it reviews what I write. I am finding it very satisfying to work this way - Rust in particular is a language whe…

[deleted]

Re: Ladybird adopts Rust, with help from AI

#122
Someone should try this with the “Ralph Wiggum loop” approach. I suspect it would fail spectacularly, but it would be fascinating to watch.

Personally, I can’t get meaningful results unless I use the tool in a true pair-programming mode—watching it reason, plan, and execute step by step. The ability to clearly articulate exactly what you want, and how you want it done, is becoming a rare skill.

Re: Ladybird adopts Rust, with help from AI

#123
> We know the result isn’t idiomatic Rust, and there’s a lot that can be simplified once we’re comfortable retiring the C++ pipeline. That cleanup will come in time.

I wonder what kind of tech debt this brings and if the trade off will be worth whatever problems they were having with C++.

Re: Ladybird adopts Rust, with help from AI

#124

I'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

#125

[flagged]

Ladybird has a strong "all dependencies built in house" philosophy. Their argument is they want an alternative implementation to whatever is used by other browsers. I'd argue they would never use a third party library like servo as a principle.

No they don’t - SerenityOS did, but when Ladybird split out they started using all sorts of third party libraries for image decoding, network, etc.

Now a core part of the browser rendering engine is not something they’re going to outsource because it would defeat the goal of the project, but they have a far different policy to dependencies now than it used to before.

Re: Ladybird adopts Rust, with help from AI

#126

Earlier quoted context omitted.

It's how most of us are actually going to end up using AI agents for the foreseeable future, perhaps with increasing degrees of abstraction as we move to a teams-of-agents model. The industry hasn't come up with a simple meme-format term to explain this workflow pattern yet, so people aren't excited about it. But don't worry, we'll surely have a bullshit term for it soon, and managers everywhere will be excited. In t…

I thought the term was "agentic engineering"

Yeah that's the top contender at the moment. I think it's pretty good.

Re: Ladybird adopts Rust, with help from AI

#127

Earlier quoted context omitted.

This is also how some of us use Claude despite what the haters say. You dont just go “build thing” you architect, review, refine, test and build.

> despite what the haters say Thinking people who disagree with you hate you or hate the thing you like is a recipe for disaster. It's much better to not love or hate things like this, and instead just observe and come to useful, outcome-based conclusions.

LLMs really do attract haters in the classic sense though. You'll find them in almost every thread on here.

Re: Ladybird adopts Rust, with help from AI

#128
post #69

All the best to them, however this feels like yah shaving instead of focusing into delivering a browser than can become an alternative to Safari/Chrome duopoly.

Part of browser experience is safety and migrating their JS library to Rust is probably one of the best ways to gain advantage over any other existing engine out there in this aspect. Strategically this may and likely will attract 3rd party users of the JS library itself, thus helping its adoption and further improving it.

They're not porting the browser itself to Rust, for the record.

Re: Ladybird adopts Rust, with help from AI

#129
Fuck me. This is wild. Sorry for the potty mouth.

    > Porting LibJS
    > 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.

    > Results
    > 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.
I'm not here to troll the LLM-as-programmer haters, but Ladybird (and Rust!) is loved by HN, and this is a big win.

How long until Ladybird begins to impact market dominance for Chrome and Firefox? My guess: Two years.

Re: Ladybird adopts Rust, with help from AI

#130

Earlier quoted context omitted.

There is also cxx.rs, which is quite nice, albeit you have to struggle sending `std` types back and forth a bit

> albeit you have to struggle sending `std` types back and forth a bit Firefox solves this partly by not using `std` types. For example, https://github.com/mozilla/thin-vec exists in large part because it's compatible with Firefox's existing C++ Vec/Array implementation (with the bonus that it's only 8 bytes on the stack compared to 24 for the std Vec).

Luckily, ladybird also does not use `std` types
Post reply on HN