Live data from Hacker News

How Stylo Brought Rust and Servo to Firefox

bholley.net

141–150 of 199 posts

Re: How Stylo Brought Rust and Servo to Firefox

#141

Earlier quoted context omitted.

> most benchmarks Which benchmarks are you talking about? It depends on what those benchmarks measure. For example, a lot of the Quantum work was in user-percieved UI latency; unless the benchmark is measuring that, and I imagine that's a hard thing to measure, it's not going to show up. > Does Rust have a runtime penalty as Golang does? Rust has the same amount of runtime as C does: very very little. https://github.…

Looking at rt.rs: sys::stack_overflow::init(); I probably don't know what this function does, because my initial guess is not very comforting. :)

Just don't call sys::stack_overflow::exploit(); and you will be fine.

Re: How Stylo Brought Rust and Servo to Firefox

#142

Earlier quoted context omitted.

Stylo is new in Firefox 57, but Mozilla has shipped other Rust code in earlier Firefox versions: https://wiki.mozilla.org/Oxidation#Rust_components_in_Firefo... Completed: MP4 metadata parser (Firefox 48) Replace uconv with encoding-rs (Firefox 56) U2F HID backend (Firefox 57) In progress: URL parser WebM demuxer WebRender (from Servo) Audio remoting for Linux SDP parsing in WebRTC (aiming for Firefox 59) Linebreakin…

Can anyone explain what a URL parser does and why it's so complex? I feel like there's a whole interesting story lurking there.

The reason the URL parser work is taking long is not because it's complex, rather it's because it's stalled. URL parsing is complex, however all this complexity was already dealt with when the Servo team wrote the rust-url crate ages ago, so it's not a factor here.

The URL parser integration was a proof of concept. It doesn't really improve stuff (aside from a slight security benefit from using Rust) so there wasn't pressure to land it; it was just a way of trying out the then-new Rust integration infra, and inspiring better Rust integration infra.

One of the folks on the network team started it, and I joined in later. But that person got busy and I started working on Stylo. So that code exists, and it works, but there's still work to be done to enable it, and not much impetus to do this work.

This work is mostly:

- Ferreting out where Gecko and Servo don't match so that we can pass all tests. We've done most of this already, whatever's left is Gecko not matching the spec, and we need to figure out how we want to fix that.

- Performance -- In the integration we currently do some stupid stuff wrt serialization and other things; because it was a proof of concept. This will need to be polished up so we don't regress

- Telemetry -- before shipping we need to ship it to nightly in parallel with the existing one and figure out how often there's a mismatch with the normal parser

It's not much work, but everyone is busy.

Re: How Stylo Brought Rust and Servo to Firefox

#143

FF has for me crashed more times in the last week than in the previous year. - Multiple installs on different Linux systems. The last crash was with a clean profile. And then there's the disappearing dev tools - that's fun. EDIT: I hope that there is something weird with my systems. But I fear that the rush to push this out might have been a little hasty. EDIT EDIT Apart from the crashes the new FF has been nice. I'v…

I’ve had several FF crashes as well, but to be sure when I opened the same pages in Safari, it crashed as well.

Re: How Stylo Brought Rust and Servo to Firefox

#144

Earlier quoted context omitted.

You can still give Apple credit for having sponsored a significant investment into LLVM. Without them, it might not have taken off the way it has.

Indeed. Apple often also gets flak for taking KHTML and running with it, but footing the bill for WebKit development was a good thing for the Internet in general.

Not giving Apple credit for LLVM or Webkit is akin to not giving Google credit for Android or Chrome.

Re: How Stylo Brought Rust and Servo to Firefox

#146
post #47

> They borrowed Apple’s C++ compiler backend, which lets Rust match C++ in speed without reimplementing decades of platform-specific code generation optimizations. This was a pretty smart move by the Rust team, and this gave them a rock solid platform to go cross-platform. In words of Newton, "If I have seen further it is by standing on the shoulders of giants". Kudos team Rust, and let's hope they eat C++'s lunch so…

Does this just mean LLVM? Because it's weird to describe it as "Apple's", Apple just uses it.

> it's weird to describe [LLVM] as "Apple's"

It's equally weird to describe Android as "Google's".

Re: How Stylo Brought Rust and Servo to Firefox

#147

Earlier quoted context omitted.

Not sure if this is normal, but I have very noticeable lag in the search/address bar autocomplete which does make the whole browser feel a bit slow (MacOS Sierra, using Developer Edition). And since we are here, the prompt/dialog windows in FF are still not native looking too. These are my two major complaints :)

I don't work on Firefox, but you should file bugs. I've generally had a pretty good time doing so.

I've enjoyed filing bugs too, but my first bug is about to celebrate its 10th birthday. Hopefully it will be fixed before it can legally drive a car.

Re: How Stylo Brought Rust and Servo to Firefox

#148
post #2

One thing I've noticed about Firefox, especially on mobile, is that transform animations are pretty janky. Does anyone know if this is being worked on? Should I submit a bug report?

In about:config, make sure privacy.resistFingerprinting is false. This messes with timer accuracy.

Re: How Stylo Brought Rust and Servo to Firefox

#149
post #120

Earlier quoted context omitted.

Wasn't the original Mozilla leading into Firefox wildly successful, though? It certainly put a dent in IE's market share. The opposite has been true for Chrome so it seems their recent history is not one of successful adaptation.

The first thing to consider is that MS let IE stagnate, and had large deviations from W3C standards. Mozilla rode in on the cry for standard adherence. Chrome on the other hand is not stagnant, far from it. And Google is not letting Chrome stagnate. Never mind that Google is using their marketing muscle to push Chrome every chance they get. Just try downloading some shareware on Windows, and you are bound to get Chro…

Actually the two incident is pretty similar.

While Google has not let Chrome stagnate, the Chrome today is no longer the Chrome when it was released. Chrome has definitely felt slower and heavier over the years. Google today is no longer the Google it once was*, and it is getting lots of sticks over privacy problem. Firefox happens to be in the right place at the right time.

Re: How Stylo Brought Rust and Servo to Firefox

#150

Earlier quoted context omitted.

The original plan was for the Servo project was to develop a new browser engine separate from Gecko, similar to the original Mozilla transition. An alpha-quality browser with Servo as an engine was originally a 2015 goal, and the active goal tracking this was removed from the roadmap in 2016: https://github.com/servo/servo/wiki/Roadmap/_compare/47f490b... As someone who was involved with Servo during that time period…

When I looked at browser.html, it was what you could call an "alpha-quality browser", unless we use different definitions of the term "alpha-quality".

We all due respect, browser.html can do so little that it's hardly more than a prototype. Also, Servo itself as a web engine is still far from supporting enough of the web stack to be usable in a daily browser.

I guess putting effort in Stylo diverted some resources from Servo - I feel it didn't progress much the last year in terms of "sites I can browse for more than 5 minutes". At this point it's clear that Mozilla is unlikely to staff Servo to fill the gap (although cpearce and others are working on getting the gecko media stack in Servo), but I wonder what will happen once WebRender makes its way in Gecko; are there any other pieces of Servo that can be useful?

Post reply on HN