Oxidation

From MozillaWiki
Revision as of 19:34, 26 July 2017 by Rillian (talk | contribs) (→‎Supported Rust versions for Firefox builds: Document 59 esr staying on rust 1.22.x)
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

Proposed

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

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

Meetings

  • Mozlando [6]
  • Oxidation Nov. 2015 [7]
  • Mozlandia [8]
  • Whistler [9]