Hacker News new | past | comments | ask | show | jobs | submit login

I know they didn't do this on purpose and it was because it started as part of SerenityOS, but I'm unexcited by this project because it's written in C/C++.

Rust was literally invented to solve the security and concurrency issues inherent in using C/C++ for a browser engine. You could argue that's the one use-case where it is objectively the best language to use. It's so valuable for that purpose that every large company has rewritten at least some crucial components in Rust.

I also think Rust will be one of the only languages strict enough to enable the use of AI-generated code without compromising security. I certainly don't want AI-generated code for high-security applications, but there's nothing we can do to stop it at this point.




I believe the team has said they are currently evaluating different languages, though they have not divulged which ones. From the FAQ on the Ladybird website:

"We are actively evaluating a number of alternatives and will be adding a mature successor language to the project in the near future. This process is already quite far along, and prototypes exist in multiple languages."

I assume it's either Rust or Jakt (the latter a language in development by the Ladybird lead dev), though I suppose Swift might be on the table.


Creating a new language is almost as insane as building a browser engine. I do not expect this to become a viable browser regardless, but I guarantee it'll fail if they use their own new language for it.


Rust is great in theory. But idioms are still being teased out and it hasn’t been used on anything with more code than servo afaik.

C/C++ is arguably the safer choice in terms of actually completing and maintaining a project of this magnitude.


> it hasn’t been used on anything with more code than servo afaik.

It very much has.


Name them, then.

I do like Rust, but I've only come across a few "higher profile ish" projects. None were really that important or useful that I actually bothered to remember them.


You're replying to Steve Klabnik, co-author of the Rust book [0] and (previously) a core team member for years. If he says it's been used on big projects I'd be inclined to believe him.

Note that it's likely that some of the biggest applications aren't public and so even if identified you couldn't actually count the lines yourself.

[0] https://doc.rust-lang.org/stable/book/


What he said is true, AWS uses Rust heavily in some of AWS core systems https://aws.amazon.com/blogs/devops/why-aws-is-the-best-plac....

Some of the open source projects you can find are AWS Firecracker https://github.com/firecracker-microvm/firecracker and Cloudflare Pingora https://github.com/cloudflare/pingora


Companies like Amazon, Facebook, and Cloudflare have millions of lines of Rust code running in production.


Don't forget Microsoft.

Windows 11 kernel will soon be booting with Rust inside (https://news.ycombinator.com/item?id=35738829)

Microsoft seeks Rust developers to rewrite core C# code (https://news.ycombinator.com/item?id=39240205)


I only left them off because we’re talking about size here, and I don’t know how much code that actually is. I am a Windows user, so I’m quite excited to have Rust in my kernel! But as far as I know it’s just one small bit, with more to come!


> I've only come across a few "higher profile ish" projects

Of course, your mind is biased towards things that have existed for years before Rust gained traction. Those codebases aren't necessarily going to be rewritten overnight (if at all) in Rust. Others have mentioned it, but tech companies are writing foundational software with Rust, check out Cloudflares repository list for example:

https://github.com/orgs/cloudflare/repositories?q=language%3...


> Rust was literally invented to solve the security and concurrency issues inherent in using C/C++ for a browser engine.

Are most browser vulnerabilities not still found in engines like V8? Rust can help with something like last year's buffer overflow in libwebp (although that's overkill when a project like https://github.com/google/wuffs exists), but I'm unclear on how it gets you a better JIT.


AIUI, Servo has been a failure because Rust is not very good at this problem domain. Browsers have to deal with circular references and this is easily handled in C++.

Hopefully someone who knows more will explain this better


Rust has memory-safe handling of circular references, but it can also be done with "unsafe" blocks.

It's (much) more involved than using C++, but that's a worthwhile tradeoff for something as important as a browser engine.

More info: https://eli.thegreenplace.net/2021/rust-data-structures-with...


if you ever write the words "unsafe" in a rust codebase, and you are not directly needing to poke bits on some hardware, you are doing it very, very wrong.

good link you shared. i personally always went with option 2 he presents.


This kind of dogmatism is why people think Rust will be impossible to adopt. All `unsafe` means is that the code inside the block doesn't have Rust's guarantees and should be inspected extra carefully by hand, much the same as you'd ideally inspect every single line of C. If sprinkling `unsafe` everywhere allows an organization to quickly adopt Rust's guarantees elsewhere and they're aware of that caveat (hard not to be given the naming) that can only be a net improvement over doing the entire thing in C.

You can always go through and systematically remove unnecessary `unsafe` later if needed, but there's no need to do so upfront if that would prevent adoption.


there's literary two other patterns on the one example in this thread...

refactoring those unsafe will never happen in the kind of place that put them in place to begin with.


C++ is an awesome language for this. Even Firefox isn't all Rust. Do you think it's wise to use tech controlled by your main competitor?


> Do you think it's wise to use tech controlled by your main competitor?

Mozilla doesn't control Rust, and why would it matter? What is your disaster scenario here? What would Mozilla do to sabotage Ladybird?

At this point, Ladybird has no competitors because it is not much more than a hobby project. It isn't usable yet.


Friends of Mozilla certainly control Rust, and it is not outside the realm of possibility for Rust to switch to an awful license. It may be a bit much to suppose that Rust devs would sabotage Ladybird but certainly there is a potential conflict of interest that should be looked at.

>At this point, Ladybird has no competitors because it is not much more than a hobby project. It isn't usable yet.

Whether or not it is usable is a temporary technical issue. It absolutely is a contender for mindshare. Lots of people want a browser that isn't controlled by a nefarious advertising megacorp, and Firefox is about the only game in town. That is hopefully going to change.


> Friends of Mozilla certainly control Rust

Like who?

Anyway, it would be a good thing anyway because "friends of Mozilla" are likely some of the most dedicated FOSS people working in software.

> it is not outside the realm of possibility for Rust to switch to an awful license

It is absolutely outside the realm of possibility. It is as impossible as Python or any other major language doing it. Millions of lines of Rust are in production at for-profit and non-profit orgs, as well as in FOSS projects.

Even if they did it, Rust would be immediately forked and continue as it was before under a different name.

> Whether or not it is usable is a temporary technical issue.

I disagree. It is a long-term technical issue, because every viable browser engine so far has had many millions of person-hours put into it. Ladybird isn't close and likely never will be.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: