News for hackers. Stuff that matters.
Re:It’s time to give Firefox another chance by Turing_Machine on Friday September 29, 2017 @11:23PM (#15371033)
How much Rust is actually in the new Firefox? I'm not seeing any based on a casual click-around in the repo, though I'll freely admit I haven't scanned the entire source tree.

Edit: if there is any, can someone give me a link to the part of the source tree that has it?

Re:It’s time to give Firefox another chance by kenhwang on Friday September 29, 2017 @11:35PM (#15371077)
Read about the first bit of Rust shipping here: https://hacks.mozilla.org/2016/07/shipping-rust-in-firefox/

And many of the Rust things that make FF56+ fast can be found here: https://wiki.mozilla.org/Quantum

Re:It’s time to give Firefox another chance by noncoml on Saturday September 30, 2017 @02:43AM (#15371600)
Great pointers, thanks.

Do they also have any write-up on how did they find Rust during these changes? Was the back count lower than usual? Did the see an increase on productivity?

Re:It’s time to give Firefox another chance by 482794793792894 on Sunday October 01, 2017 @11:13AM (#15378217)
These components were built as part of the Servo project and then ported to Firefox, so you'd probably just want to ask the Servo team directly. You can find them on IRC, in the channel #servo on irc.mozilla.org.

There is https://blog.servo.org/, but it's mostly gradual updates on things, not a general overview.

Re:It’s time to give Firefox another chance by coffee-- on Friday September 29, 2017 @11:34PM (#15371072)
Re:It’s time to give Firefox another chance by Turing_Machine on Friday September 29, 2017 @11:38PM (#15371082)
Thanks.
Re:It’s time to give Firefox another chance by Manishearth on Saturday September 30, 2017 @04:50AM (#15371926)
- The mp4 metadata parser. This has been shipping for a while now, and was the first shipped Rust code.

- The URL parser (rust-url). This is not shipping, because it's incomplete and there are some mismatches to deal with. But it exists.

- Stylo: Servo's CSS engine in Firefox. By far the biggest one, this is shipping in beta and nightly, and should be there in the 57 release for everything but Android

- webrender: Servo's GPU-focused renderer. Not shipping, can be flipped on in nightly. Still has work to be done

- encoding-rs: All encoding operations go through this now. Shipping

- The U2F stuff: A lot of the U2F code is in Rust. Shipping in nightly though I think it's still off by default (but that will change soon?)

As far as the location of the code:

The root rust crate is at https://hg.mozilla.org/mozilla-central/file/tip/toolkit/libr... . Everything can be reached from it, and the cargo file that has all these links is https://hg.mozilla.org/mozilla-central/file/tip/toolkit/libr...

- All of Servo is vendored in tree in https://hg.mozilla.org/mozilla-central/file/tip/servo . Not all of Servo is used, the majority of the used code is from https://hg.mozilla.org/mozilla-central/file/tip/servo/compon...

- Webrender is vendored in tree in https://hg.mozilla.org/mozilla-central/file/tip/gfx/webrende...

- The U2F HID stuff is vendored at https://hg.mozilla.org/mozilla-central/file/tip/dom/webauthn...

- There's a bunch of stuff in libcubeb ; I don't even know what it's there for (https://hg.mozilla.org/mozilla-central/file/tip/media/libcub...)

- You can find "c api" rust crates scattered throughout, like mp4parse_capi, rust-url-capi, encoding_glue . These depend on the actual crate (usually, a crate that's published to crates.io) but expose an API that C can call into

- Finally, any dependency from crates.io is vendored in https://hg.mozilla.org/mozilla-central/file/tip/third_party/... . Note that this includes build time dependencies (so you'll find crates that deal with CLI parsing and terminal color info that aren't actually used by firefox). Despite the folder being labeled "third_party", a lot of that code is maintained by us, but in separate repos and published to crates.io. In particular, large chunks of Servo are reusable published crates.

Re:It’s time to give Firefox another chance by kibwen on Saturday September 30, 2017 @12:02AM (#15371146)
I don't know if there's any one location for all the Rust code; it may not make logical sense to put the MP4 parser written in Rust right next to the CSS engine, for example. I believe that https://github.com/mozilla/gecko-dev is a mirror of the repo in question, and so we can use Github's search function to find every file that it detects as being a Rust file: https://github.com/mozilla/gecko-dev/search?l=rust (which finds 3,274 Rust files, 6,701 C files, and 22,722 C++ files).