Remix.run Logo
stingraycharles 6 hours ago

But wasn’t Rust designed specifically for being a language for developing a rendering engine / web browser?

diath 6 hours ago | parent | next [-]

Rust initially started as a hobby project of a person who happened to be a Mozilla employee and later got sponsored by the foundation however it was not a language that was specifically designed with browsers in mind.

estebank 6 hours ago | parent | next [-]

The language's largest project before it hit 1.0 was Servo. The language wasn't designed for browsers, but it certainly was informed by them and their struggles with maintaining and developing Firefox.

throawayonthe 6 hours ago | parent | prev | next [-]

a lot of early rust design was driven by Servo - an internal mozilla project, and firefox component prototypes

hollerith 6 hours ago | parent | prev [-]

How could browsers not be on his mind when his job was to contribute to Firefox as a dev?

diath 6 hours ago | parent [-]

Do your hobbies revolve around the benefits for your employer? I don't mean it in a snarky way either, but given that Rust was initially written in OCaml, you could see how it could go like "I like programming, I like type systems but I want something procedural over functional so let me give it a go".

hollerith 6 hours ago | parent [-]

It can be described as a hobby project only in the sense that his employer would probably prefer that he spend all his time working on Firefox.

Tools to do X better are often designed by people who get paid a lot to do X and worry about losing their job if they are not good enough at X.

If he were to tell me that he didn't imagine Rust's helping with browser dev when he designed Rust, then I'd believe him, but the "circumstantial" evidence points strongly in the other direction.

LeFantome 4 hours ago | parent | prev | next [-]

> Rust designed specifically for being a language for developing a rendering engine

Rust was born at Mozilla, sort of. It was created by a Mozilla employee. The first "real" project to put it into action was Servo of which parts were adopted into Firefox. While Rust may not have been developed "specifically" to create a browser, it is a fair comment.

That said, Ladybird was started as part of the SerenityOS project. That entire project was built using C++. If the original goal of Serenity was to build an opeerating system, C++ would have felt like a reasonable choice at the time.

By the time Ladybird was looking for "better" languages than C++, Ladybird was already a large project and was making very heavy use of traditional OOP. Rust was evaluated but rejected because it did not support OOP well. Or, at least, it did not support integration into a large, C++ based, OOP project.

Perhaps, if Ladybird had first selected a languge to write a browser from scratch, they would have gone with Rust. We will never know,

We do know that Mozilla, despite being the de facto stewards of Rust at the time, and having a prototype web browser written in Rust (Servo), decided to drop both Rust and Servo. So, perhaps using Rust for browsers is not as open and shut as you imply.

stingraycharles 3 hours ago | parent [-]

I stand corrected, I was always under the impression that Rust was created specifically for Servo; TIL.

greazy 6 hours ago | parent | prev | next [-]

No. It was developed as a general purpose language.

I think you are conflating the development of Servo with the design and development of Rust.

steveklabnik 4 hours ago | parent | prev | next [-]

As someone who was on that team for a long time, we took that into consideration, but it was never specifically for that. There was some stuff the Servo team would have liked us to have implemented that we didn’t.

6 hours ago | parent | prev | next [-]
[deleted]
heavyset_go 6 hours ago | parent | prev [-]

Might not be the best choice for browser chrome, where an OOP paradigm for GUIs might make sense.