Live data from Hacker News

Shipping Rust code in Firefox

hacks.mozilla.org

21–30 of 197 posts

Re: Shipping Rust code in Firefox

#21
post #11

Earlier quoted context omitted.

I would expect the phrase "shipping Rust" to mean that they include the language environment, so that I can write code in Rust with Mozilla.

That doesn't make sense. It is a statically compiled systems-oriented language, not a web-oriented language.

Of course it doesn't make sense. I'm talking about what the the headline says.

Re: Shipping Rust code in Firefox

#22
post #11

Earlier quoted context omitted.

That doesn't make sense. It is a statically compiled systems-oriented language, not a web-oriented language.

The headline is nerdview. http://languagelog.ldc.upenn.edu/nll/?p=26094

There is a whole article that explains the headline. The headline can't include 100% of background.

Re: Shipping Rust code in Firefox

#24

AHHH Telemetry! I feel like there is a group of people who freak out to any form of telemetry, I just wanted to highlight them using it to track bugs. It's super beneficial to any form of changes, especially something like switching an entire language for a component.

IIRC the telemetry involved here was only run on the nightly/developer edition versions. Or something like that.

The restrictions on telemetry on release versions are pretty stringent. It's possible this was measured on release, I'm not aware of the details, but I suspect it wasn't.

Re: Shipping Rust code in Firefox

#25
post #13

Am I'm reading either the headline or the announcement wrong? As I read it, they are not shipping Rust but a component written in Rust. > For this reason, Ralph Giles and Matthew Gregan built Mozilla’s first Rust > media parser. And I’m happy to report that their code will be the first > Rust component shipping in Firefox.

You did not think, they would replace VanillaJS with Rust, did you? ;)

This will happen. Rust can already be compiled to JS, although that's not very practical for client-side work right now.

When WebAssembly is finished, stable, and widespread, I guarantee people will be using end-to-end Rust (among other languages).

Re: Shipping Rust code in Firefox

#26

I'm sort of surprised that this is the first time they've used rust for anything in the browser. I thought they developed Rust for this exact purpose?

Rust was supported from the start by Mozilla in order to enable the construction of an experimental browser engine (ie. Servo) that was completely separate from Gecko and Firefox. Afaik, there was never any explicit goal at the beginning to rebuild things in Firefox - this is just the result of how successful the language project has been.

Re: Shipping Rust code in Firefox

#27

Super exciting! I followed Rust at the beginning and I was pleased with the design goals of the language. However, I wasn't thrilled with the pre-1.0 documentation, and even after 1.0 there were breaking changes to the language. Hopefully this is a sign of Rust's maturity. I'll have to look at it again:>) EDIT: s/from/at/

Which post-1.0 breaking changes were you worried about? This is technically correct, but we've managed it in a way that's been hopefully painless to deal with, and the community survey seemed to agree.

Re: Shipping Rust code in Firefox

#28

Does this imply anything regarding rust compiler package for distros? To support the Firefox build, all distros will have to have good rust compiler packages now, right? (I'm sure the status is already not bad, I haven't checked recently..) If it becomes something dependable, infrastructure-wise, like Java, this might mark the beginning of a more serious uptake.

We've been doing a lot of work in this area, and some distros already have packages. Debian testing, for example.

Currently, I believe that this functionality is optional, so distros aren't required to actually ship it just yet.

Re: Shipping Rust code in Firefox

#29
post #13

Am I'm reading either the headline or the announcement wrong? As I read it, they are not shipping Rust but a component written in Rust. > For this reason, Ralph Giles and Matthew Gregan built Mozilla’s first Rust > media parser. And I’m happy to report that their code will be the first > Rust component shipping in Firefox.

You did not think, they would replace VanillaJS with Rust, did you? ;)

What does "replace" have to do with it? Why do you invent the most illogical option possible - that I never uttered - to find a counter argument?

Assuming that they ship another language in addition to Javascript would not be completely out of the question. While it seems that with WebAssembly that is no longer necessary, who knows what Mozilla, in search of future funding, may come up with to open new markets. They also tried creating their own OS for mobile - shipping Rust to further its adoption for whatever to me at the moment inconceivable reason is no less improbable.

So yes, I wasn't sure what to expect from the headline - it said they are "shipping Rust" after all, so something crazy was certainly within realm of possibility.

Re: Shipping Rust code in Firefox

#30
post #9
post #5

I'm curious why rust-url still hasn't been shipped with firefox yet. https://bugzilla.mozilla.org/show_bug.cgi?id=1151899

There are a couple of big pieces of work here: 1) Making the "cargo vendor" story work better. rust-url has a bunch of dependencies, and you have to get them all in-tree. 2) More security review & planning. URL parsing is scary! And we'd want to ship & run it alongside the C++ one to check for places where rust-url is not fully web compatible, but there are major privacy issues in reporting back anything more than "1…

For some context on point 1, https://github.com/rust-lang/cargo/pull/2857
Post reply on HN