Oxidation is a project to integrate Rust code into Gecko and Firefox.
Rust has been required on all platforms since Firefox 54, and we are actively adding new code modules written in Rust to Firefox and related programs.
- 1 Documentation
- 2 Supported Rust versions for Firefox builds
- 3 Rust components in Firefox
- 4 Rust components outside Firefox
- 5 Blockers and obstacles
- 6 Meetings
Supported Rust versions for Firefox builds
Below are our expectations if everything goes smoothly; we may need newer toolchains to address specific issues. Our ultimate policy is just that release Firefox will not require unstable or beta Rust to build.
- Firefox 56 (released 2017 September 26) requires Rust 1.17.0 or later.
- Official builds will use Rust 1.19.0.
- Firefox 57 (released 2017 November 14) requires Rust 1.20.0.
- Mozilla-central can start using Rust 1.19.0 language features 2017 August 3.
- Mozilla-central can start using Rust 1.20.0 features 2017 September 14.
- Firefox 58 (released 2018 January 16) requires Rust 1.21.0.
- Mozilla-central can use Rust 1.21.0 language features 2017 October 26.
- Firefox 59 (released 2018 March 6) requires Rust 1.22.0.
- Mozilla-central can use Rust 1.22.0 features 2017 December 7.
- Firefox 59 ESR is expected to continue to work with Rust 1.22 throughout its support lifetime.
- Firefox 60 (released 2018 May 1) requires Rust 1.23.0.
- Mozilla-central can use Rust 1.23.0 features 2018 January 18.
- Firefox 61 (released 2018 June 26) requires Rust 1.25.0.
- Mozilla-central can use Rust 1.24.0 features 2018 March 6.
- Mozilla-central can use Rust 1.25.0 features 2018 April 12.
Rust components in Firefox
- MP4 metadata parser: bug 1161350 (shipped for desktop in Firefox 48)
- Replace uconv with encoding-rs: bug 1261841 (shipped in Firefox 56)
- CSS style calculation (from Servo): bug stylo (shipped in Firefox 57)
- U2F HID backend: bug 1388843 (shipped in Firefox 57)
- URL parser: bug url-oxidation
- WebM demuxer: bug 1267492
- WebRender (from Servo): bug webrender
- Audio remoting for Linux: bug 1362220
- SDP parsing in WebRTC: bug 1365792 (aiming for Firefox 59)
- Linebreaking with xi-unicode: bug 1290022
- Optimizing WebVM compiler backend: cretonne
- Replace the XML parser
- Replace the preferences module: bug 1379383
- WebMIDI: bug 1201593, bug 1201596, bug 1201598
- Gamepad code: bug 1286699
- Replace the telemetry module(?)
- Share media playback stack with Servo(?)
- Replace DOM serializers (XML, HTML for Save As.., plain text)
Rust components outside Firefox
- GeckoDriver - WebDriver implementation for Firefox integrated via marionette protocol (bug 1340637) released as a standalone binary (releases)
Blockers and obstacles
Raw Rust code (lives in m-c) blockers
- [DONE] Top-level metabug: bug oxidation
- [DONE] Android support: bug 1220307
- Though Android still not a Tier-1 Rust platform: https://forge.rust-lang.org/platform-support.html
- Linux distro support for Rust: 
- [DONE] Need to improve call stacks: bug 1268328
Cargo / GitHub blockers
Rust / Cargo nice-to-haves
- Tracking bug: Make the developer experience for Firefox + Rust great: bug rust-great
- [DONE] Per-crate integer overflow checking 
- Artifact caching 
Things blocking new components from being written in Rust
- Lack of Mozilla-wide Rust training for engineers
- Lack of IPC/IPDL integration (e.g. generated Rust bindings)
- Lack of a WebIDL binding generator for dom components (servo must have something here?)
- Immature rust-bindgen and cheddar/cbindgen tools for general cross-language support.
- Slow compile times