Live data from Hacker News

How Stylo Brought Rust and Servo to Firefox

bholley.net

71–80 of 199 posts

Re: How Stylo Brought Rust and Servo to Firefox

#71

> Stylo was the culmination of a near-decade of R&D, a multiple-moonshot effort to build a better browser by building a better language. This is the most impressive, and useful aspect of all the recent work in Firefox. Rust is an amazing language. It really brings something new to the table with its borrow checker. The fact that rust was created as part of a greater effort to work on a web browser is amazing.

What I wonder, and I do not mean this in negative way, is whether this would have happened in a more commercially oriented organisation. Mozilla remains a foundation, and I consider Rust a fruit of their labour in itself. To put it another way, I find it hard to justify developing Rust just for a web browser. But if you consider it from the perspective of a foundation developing tools for the developer community as a…

The majority of programming languages used across the industry have had commercially oriented organisations behind them, including all the C family of programming languages.

Re: How Stylo Brought Rust and Servo to Firefox

#72
post #12

Congratulations, it's really an unparalleled performance of parallel performance.

Speaking of which: does anyone know if some new optimization land in the beta versions a couple of days ago? Or if some bug that caused delays on Linux got fixed? I updated my developer version yesterday and it was as if Firefox - already ludicrously fast compared to before - turned on the turbo booster. Obviously, I'm not complaining ;)

The next Servo component is webrender and I'm not certain on if it has been flagged to on for developer edition but that would certainly affect speed.

Re: How Stylo Brought Rust and Servo to Firefox

#73

> 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…

It's pretty much standard these days for any non-VM language to target LLVM.

Re: How Stylo Brought Rust and Servo to Firefox

#74
post #66

Earlier quoted context omitted.

Stylo is now enabled in Firefox for Android's Nightly builds. You can install Nightly from the Google Play Store to see if Stylo makes a difference for the animation problems. https://play.google.com/store/apps/details?id=org.mozilla.fe...

since when? I've been running Nightly for months.

Landed ~5 days ago:

https://hg.mozilla.org/mozilla-central/rev/db56323cd08f

Re: How Stylo Brought Rust and Servo to Firefox

#75
post #42

It's gratifying to see how successfully the same organization has learned from the debacle that was the rewrite from Netscape 4 to Mozilla in the first place. That time, they didn't release for years, losing market share and ceding the web to Internet Explorer for the next decade. Joel Spolsky wrote multiple articles[1][2] pointing out their folly. This time, their "multiple-moonshot effort" is paying off big-time be…

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, I was disappointed at the time that it was quite obviously not going to happen. However, looking at what has happened since then, the change of focus towards Firefox integration was definitely a good move.

Re: How Stylo Brought Rust and Servo to Firefox

#76

Earlier quoted context omitted.

Speaking of which: does anyone know if some new optimization land in the beta versions a couple of days ago? Or if some bug that caused delays on Linux got fixed? I updated my developer version yesterday and it was as if Firefox - already ludicrously fast compared to before - turned on the turbo booster. Obviously, I'm not complaining ;)

The next Servo component is webrender and I'm not certain on if it has been flagged to on for developer edition but that would certainly affect speed.

I'd be shocked, WebRender is still not default in nightly, and I'd expect that before it was turned on for beta/DE.

Re: How Stylo Brought Rust and Servo to Firefox

#77
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.

> Apple just uses it.

Apple "just uses LLVM" in the same way Apple "just uses Webkit".

Apple hired Chris Lattner back in 2005, just as he completed his PhD. At the time, LLVM could just barely compile Qt4[0] (the result didn't quite actually work yet) and was still hosted on CVS.

Lattner had to make LLVM production-ready (rather than a research project), add a bunch of major features, start a C/C++/ObjC frontend (Clang) and create a team of LLVM developers in the company.

Apple shipped their first bits of LLVM-based tooling in Leopard in 2007.

[0] https://web.archive.org/web/20111004073001/http://lists.trol...

Re: How Stylo Brought Rust and Servo to Firefox

#78

Earlier quoted context omitted.

Stylo is the biggest and most significant thing; there are some smaller bits (a media parser, and something else?) included before 57.

I'd say the change of the encoding stack to encoding-rs is pretty significant; while it's not that much code it's stuff that gets used throughout the codebase.

That's fair, and you know the impact better than I!

Re: How Stylo Brought Rust and Servo to Firefox

#79

Earlier quoted context omitted.

Speaking of which: does anyone know if some new optimization land in the beta versions a couple of days ago? Or if some bug that caused delays on Linux got fixed? I updated my developer version yesterday and it was as if Firefox - already ludicrously fast compared to before - turned on the turbo booster. Obviously, I'm not complaining ;)

The next Servo component is webrender and I'm not certain on if it has been flagged to on for developer edition but that would certainly affect speed.

If I remember correctly, it's in Nightly behind a feature flag, not Beta.
Post reply on HN