Live data from Hacker News

Shipping Rust code in Firefox

hacks.mozilla.org

51–60 of 197 posts

Re: Shipping Rust code in Firefox

#51
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

I'd say it's nerdview that's going to be read by nerds, and that unlike the examples in that lovely post, it will be understood by the majority of people who read it.

Re: Shipping Rust code in Firefox

#52
post #13

Earlier quoted context omitted.

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…

> While it seems that with WebAssembly that is no longer necessary

I believe they have mentioned that a WebAssembly target for Rust compilation is something they are working towards, and IMO that would be the ideal way to deploy Rust for a website (if it's a compiled language, there's no need to deliver it uncompiled).

Re: Shipping Rust code in Firefox

#53

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.

"Freak out" is a bit strong, but it's not illogical to dislike telemetry. It's an extra bit of tracking being broadcast by your devices, and as we know from the Snowden docs, the NSA uses collected windows error reporting (telemetry) to help target their exploits.

That someone is worried about these issues does not imply that they don't understand the value of telemetry data for developers. It's just a question of tradeoffs, and it's a decision the user should make.

I don't dislike error reporting in programs. I dislike it when programs call home without asking permission.

Re: Shipping Rust code in Firefox

#54

Earlier quoted context omitted.

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

I'd say it's nerdview that's going to be read by nerds, and that unlike the examples in that lovely post, it will be understood by the majority of people who read it.

Sure, it wasn't egregious, but I think the insider perspective idea has lots of explanatory power when it comes to the confusion Noseshine expressed and the surprise wyager responded to the confusion with.

Re: Shipping Rust code in Firefox

#55

Earlier quoted context omitted.

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.

From my understanding release is opt-in only. (My understanding is based upon whenever I install Firefox it promts me to enable telemetry, which is disabled by default)

Right, but I think even then you opt in to a very restricted subset.

Again, ICBW here.

Re: Shipping Rust code in Firefox

#58

Earlier quoted context omitted.

If you look on the Mozilla bug tracker you can look at a number of tickets open for integrating servo components into Firefox. For example Gecko is gaining support for Servo's style engine so maybe CSS will be the first large component merged. I wonder if Firefox will slowly become written in mostly Rust.

> I wonder if Firefox will slowly become written in mostly Rust. I doubt that will ever happen. Small parts of Firefox, yes, but the browser is enormous. I think I once read that even Servo, which is a showcase for Rust, has more C/C++ code in it than Rust code, largely because it uses Firefox's JS engine.

SpiderMonkey is probably a long-term target for a Rust replacement or oxidization over time, but considering it is a JIT there's certain classes of issues Rust couldn't help with since native code generation is inherently unsafe.

Re: Shipping Rust code in Firefox

#59

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.

Now that Rust can properly bootstrap from previous versions I can see most distros getting it packaged soon(TM), unfortunately the Fedora 25 change window ends today and since rust/cargo will require new packaging guidelines unless someone really steps up to the plate (I don't have time today) it won't make it in until F26.

Re: Shipping Rust code in Firefox

#60

Are there other improvements besides the security advantages from this? E.g. performance or memory usage?

Performance can be considered a consequence of security/language safety. Rust code is free from data races and developers can utilize concurrency and all available CPU cores without fear.
Post reply on HN