TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How Stylo Brought Rust and Servo to Firefox

639 pointsby mnemonikover 7 years ago

24 comments

kbdover 7 years ago
It&#x27;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&#x27;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.<p>This time, their &quot;multiple-moonshot effort&quot; is paying off big-time because they&#x27;re doing it incrementally. Kudos!<p>[1] <a href="https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;04&#x2F;06&#x2F;things-you-should-never-do-part" rel="nofollow">https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;04&#x2F;06&#x2F;things-you-should-...</a><p>[2] <a href="https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;11&#x2F;20&#x2F;netscape-goes-bonkers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.joelonsoftware.com&#x2F;2000&#x2F;11&#x2F;20&#x2F;netscape-goes-bonk...</a>
评论 #15802094 未加载
评论 #15801903 未加载
评论 #15803223 未加载
评论 #15803755 未加载
thomastjefferyover 7 years ago
&gt; Stylo was the culmination of a near-decade of R&amp;D, a multiple-moonshot effort to build a better browser by building a better language.<p>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.<p>The fact that rust was created as part of a greater effort to work on a web browser is amazing.
评论 #15801129 未加载
评论 #15800977 未加载
habermanover 7 years ago
I&#x27;m a huge, huge fan of Rust, Stylo, Servo, WebRender, etc. Hats off to everyone involved.
评论 #15800786 未加载
评论 #15805921 未加载
评论 #15803262 未加载
评论 #15802078 未加载
FlyingSnakeover 7 years ago
&gt; They borrowed Apple’s C++ compiler backend, which lets Rust match C++ in speed without reimplementing decades of platform-specific code generation optimizations.<p>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, &quot;If I have seen further it is by standing on the shoulders of giants&quot;. Kudos team Rust, and let&#x27;s hope they eat C++&#x27;s lunch soon.
评论 #15801352 未加载
评论 #15801814 未加载
VeejayRampayover 7 years ago
It might sound very naive to say this, but I found it very cool that it was someone from the States, an Aussie and a Spaniard working on this, open source is something magical when you think about it. Props to everyone involved, all those projects sound like a lot of fun for a good cause.
评论 #15802964 未加载
linkregisterover 7 years ago
I love Firefox Quantum and it has replaced Chrome as my browser at home. It&#x27;s memory consumption is far lower with the same amount of tabs open.<p>That said, why does it perform slower than Chrome on most benchmarks? Is it due to the Chrome team doing much more grunt work regarding parallelism and asynchronous I&#x2F;O? Or are there still features in the current Firefox build that still call the original engine?<p>Does Rust have a runtime penalty as Golang does?
评论 #15802193 未加载
DonbunEf7over 7 years ago
&quot;So it’s pretty clear by now that “don’t make mistakes” is not a viable strategy.&quot;<p>This is more generally known as Constant Flawless Vigilance: <a href="https:&#x2F;&#x2F;capability.party&#x2F;memes&#x2F;2017&#x2F;09&#x2F;11&#x2F;constant-flawless-vigilance.html" rel="nofollow">https:&#x2F;&#x2F;capability.party&#x2F;memes&#x2F;2017&#x2F;09&#x2F;11&#x2F;constant-flawless-...</a>
Brakenshireover 7 years ago
One thing I&#x27;ve been wondering is that Stylo and Webrender can parallelize CSS and Paint, respectively, but I haven&#x27;t seen any mention in Project Quantum (the project to integrate Servo components into Firefox&#x2F;Gecko) of any component to parallelize layout, which is probably the biggest bottleneck on the web at the moment.<p>Is parallel layout something which can only be done through a full rewrite, hence with Servo, and bringing Servo up to full web compatibility, or can this be handled through the Project Quantum process, of hiving off components from Servo into Firefox?
评论 #15802064 未加载
评论 #15801698 未加载
fulafelover 7 years ago
Congratulations, it&#x27;s really an unparalleled performance of parallel performance.
评论 #15800879 未加载
agentultraover 7 years ago
This is a great story. For large, existing code-bases <i>incremental</i> change is the only strategy I&#x27;ve seen work. Kudos to the team behind it.
pitajover 7 years ago
One thing I&#x27;ve noticed about Firefox, especially on mobile, is that transform animations are pretty janky.<p>Does anyone know if this is being worked on? Should I submit a bug report?
评论 #15800233 未加载
评论 #15801358 未加载
评论 #15800191 未加载
评论 #15803834 未加载
评论 #15804401 未加载
m0th87over 7 years ago
&gt; For example, register allocation is a tedious process that bedeviled assembly programmers, whereas higher-level languages like C++ handle it automatically and get it right every single time.<p>Ideal register allocation is NP-complete, so a compiler can&#x27;t get it right every single time.<p>I&#x27;m not sure how good in practice modern compilers are at this, but would be curious to know if there&#x27;s some asm writers who can actually consistently outperform them.
评论 #15801475 未加载
评论 #15801359 未加载
评论 #15801529 未加载
评论 #15803379 未加载
评论 #15802165 未加载
bdmarianover 7 years ago
I really like the new Fox. I’ve tried switching over completely but I think it’s causing some random BSODs on my Latitude E5570. The laptop does have a second Nvidia graphics card, for which there is no driver installed. ( don’t ask :) I’m perfectly fine with the onboard Intel and I much prefer the extra hours of battery life)
vatotemkingover 7 years ago
&gt; The teams behind revolutionary products succeed because they make strategic bets about which things to reinvent, and don’t waste energy rehashing stuff that doesn’t matter.<p>This needs to be emphasized more
Vinnlover 7 years ago
This is a great write-up that gives me warm fuzzy feelings.<p>What also is interesting for me to realise, though, is that a lot of this was happening at the same time as Mozilla was largely focused on Firefox OS, and receiving a lot of flak for that.<p>It&#x27;s a shame that Firefox OS failed, but it was clear that they had to try many different things to remain relevant, and it&#x27;s excellent to see that one of those is very likely to pay off. Even though Rust might&#x27;ve been dismissed for the same reasons Firefox OS was.
JupiterMoonover 7 years ago
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.<p>And then there&#x27;s the disappearing dev tools - that&#x27;s fun.<p>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.<p>EDIT EDIT Apart from the crashes the new FF has been nice. I&#x27;ve been able to largely stop using chromium for dev work - so not all is bad.
评论 #15800620 未加载
评论 #15800789 未加载
评论 #15803955 未加载
Annatarover 7 years ago
<i>For example, register allocation is a tedious process that bedeviled assembly programmers,</i><p>Yet more propaganda. I’ve been part of the cracking and demo scene since my early childhood. If you didn’t code in assembler you might as well not have taken part in it at all, because small fast code was everything. None of us ever had an issue with register allocation, nor do we face such issues today. Not 30+ years ago, not now.
thomastjefferyover 7 years ago
&gt; the breadth of the web platform is staggering. It grew organically over almost three decades, has no clear limits in scope, and has lots of tricky observables that thwart attempts to simplify.<p>It would be great to create the html&#x2F;css&#x2F;javascript stack from scratch, or at least make a non-backwards-compatible version that is simpler and can perform better. HTML5 showed us that can work.
评论 #15801190 未加载
评论 #15803704 未加载
评论 #15801081 未加载
gjem97over 7 years ago
What parts of FF 57 are written in Rust? Just Stylo?<p>Edit: I don&#x27;t intend for this to sound like I&#x27;m complaining, just interested.
评论 #15801306 未加载
评论 #15801533 未加载
评论 #15801294 未加载
mi_lkover 7 years ago
Off-topic, but does anyone know why in FF on Mac the pinch to zoom functionality is disabled by default? Is there any performance concern?
评论 #15806906 未加载
xtfover 7 years ago
Thanks Mozilla Going to donate
wyldfireover 7 years ago
Anecdote regarding this new FF:<p>I would find frequent cases where my system would stall for 10-20s (could not caps lock toggle, pointer stopped moving). I almost always have just Chrome and gnome-terminal open (Ubuntu 16.04). I had attributed it to either a hardware or BIOS&#x2F;firmware defect.<p>Now, after switching to Firefox I have gone a week without seeing those stalls.<p>YMMV -- I never bothered to investigate, it could be something as simple as slightly-less-memory-consumption from FF, or still a hardware defect that FF doesn&#x27;t happen to trigger.
评论 #15800640 未加载
评论 #15800670 未加载
评论 #15802477 未加载
xstartupover 7 years ago
I use firefox&#x2F;rust every day. Thanks for the one of the most interesting language!
nopitover 7 years ago
Installed the new firefox, had 1 tab running for a few days which had allocated more than 10gb of virtual memory. I had high hopes but im sticking with chrome.
评论 #15800871 未加载