Oxidation
Jump to navigation
Jump to search
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.
Documentation
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 2017 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 2017 May 1) requires Rust 1.24.0.
- Mozilla-central can use Rust 1.23.0 features 2018 January 18.
- Mozilla-central can use Rust 1.24.0 features 2018 March 1.
- Firefox 61 (released 2017 June 26) requires Rust 1.25.0.
- Mozilla-central can use Rust 1.25.0 features 2018 April 12.
Rust components in Firefox
Completed
- MP4 metadata parser: bug 1161350 (shipped for desktop in Firefox 48)
- Replace uconv with encoding-rs: bug 1261841 (shipping in Firefox 56)
In progress
- URL parser: bug url-oxidation
- CSS style calculation (from Servo): bug stylo
- WebM demuxer: bug 1267492
- WebRender (from Servo): bug webrender
- Audio remoting for Linux: bug 1362220
- SDP parsing in WebRTC: bug 1365792
- Linebreaking with xi-unicode: bug 1290022
Proposed
- 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
Completed
- 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: [1]
- [DONE] Need to improve call stacks: bug 1268328
Cargo / GitHub blockers
- [DONE] Tracking bug bug 1231764
- Improve working with vendored Cargo crates [2] [3]
Rust / Cargo nice-to-haves
- Tracking bug: Make the developer experience for Firefox + Rust great: bug rust-great
- [DONE] Per-crate integer overflow checking [4]
- Artifact caching [5]
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