Oxidation2: Difference between revisions

664 bytes added ,  20 November 2017
no edit summary
No edit summary
No edit summary
Line 24: Line 24:
** Compile times are currently slow.
** Compile times are currently slow.
** Crossing the C++/Rust boundary layer can be difficult, and is relatively slow due to no inlining.
** Crossing the C++/Rust boundary layer can be difficult, and is relatively slow due to no inlining.
*** Bindgen can be tricky, especially working around clang bugs in different versions
** Android is currently not a Tier 1 platform
** Android is currently not a Tier 1 platform
*** https://forge.rust-lang.org/platform-support.html
*** https://forge.rust-lang.org/platform-support.html
*** Hasn't shipped on many devices yet
*** Rust 1.22 should be better?
*** rillian: "As I understand it, the problem is no one has set up tests on a cloud service, so there's no way for upstream to gate work on Android regressions. Qemu emulation is too slow. There aren't many services with arm support, but there are a couple of new options. If someone does the work of setting something up we should be able to get the Rust team to adopt it."
*** rillian: "As I understand it, the problem is no one has set up tests on a cloud service, so there's no way for upstream to gate work on Android regressions. Qemu emulation is too slow. There aren't many services with arm support, but there are a couple of new options. If someone does the work of setting something up we should be able to get the Rust team to adopt it."
** Often requires adding wrapper/glue code
** Often requires adding wrapper/glue code
Line 32: Line 35:
*** The workflow is annoying
*** The workflow is annoying
*** There are continuous integration mismatches
*** There are continuous integration mismatches
*** Phabricator/Lando should fix this?
*** Servo CI is under-resourced?
*** vcs-sync/Phabricator/Lando should fix this?
*** This is not relevant for Gecko-only Rust components, however.
*** This is not relevant for Gecko-only Rust components, however.


Line 49: Line 53:
* XXX: suggest being conservative
* XXX: suggest being conservative
** heapsize is a cautionary tale
** heapsize is a cautionary tale
* WebRender is an external crate, regularly vendored into mozilla-central
* where does binding code live: in Gecko or in Servo?


= Documentation and Education =
= Documentation and Education =


* [https://developer.mozilla.org/en-US/Firefox/Building_Firefox_with_Rust_code Developer Documentation]
== Rust in general ==
* [https://gecko.readthedocs.io/en/latest/build/buildsystem/rust.html Build System Documentation]


Rust training
Rust training
* jimb + jorendorff's book?
* jimb + jorendorff's book?
* sklabnik's book?
* sklabnik's book? https://doc.rust-lang.org/book/


documentation:
documentation:
- basics on learning Rust, e.g. links to Rust stuff
- basics on learning Rust, e.g. links to Rust stuff
- Gecko-specific stuff, e.g. how to deal with crates
- #rust, #servo, #rust-internals, #rustc
- #rust, #servo, #rust-internals, #rustc
[https://public.etherpad-mozilla.org/p/stylo Stylo workflow] (applies to any changes that straddle Gecko and Servo)


XXX: encourage managers to let their staff take time to learn Rust
XXX: encourage managers to let their staff take time to learn Rust
* Lack of Mozilla-wide Rust training for engineers
* Lack of Mozilla-wide Rust training for engineers
== Rust in Firefox ==
* [https://developer.mozilla.org/en-US/Firefox/Building_Firefox_with_Rust_code Developer Documentation]
* [https://gecko.readthedocs.io/en/latest/build/buildsystem/rust.html Build System Documentation]
* [https://public.etherpad-mozilla.org/p/stylo Stylo workflow] (applies to any changes that straddle Gecko and Servo)


= Supported Rust versions for Firefox builds =
= Supported Rust versions for Firefox builds =
Line 114: Line 122:
== Proposed ==
== Proposed ==


* Parallel layout
** Code from Servo
* Replace the XML parser
* Replace the XML parser
** Parses untrusted input, replaces expat, a 3rd-party library with a history of security vulnerabilities
** Parses untrusted input, replaces expat, a 3rd-party library with a history of security vulnerabilities
Line 122: Line 132:
* Share media playback stack with Servo(?)
* Share media playback stack with Servo(?)
* Replace DOM serializers (XML, HTML for Save As.., plain text)
* Replace DOM serializers (XML, HTML for Save As.., plain text)
* Image decoders?


= Rust components outside Firefox =
= Rust components outside Firefox =
Line 148: Line 159:
** Landing/merging process
** Landing/merging process


* Any remaining crash report issues? {{bug|1348896}}
* Debugging?
* Debugging?
* IDE/symbol lookup support?
* IDE/symbol lookup support?
* Code coverage?
* Code coverage?
* Profiling?
* Profiling?
** Especially for parallel code
* Test integration?
* Test integration?


Line 163: Line 176:
* Slow compile times
* Slow compile times
** Incremental compilation (XXX: tracking issue?)
** Incremental compilation (XXX: tracking issue?)
** ThinLTO (XXX: tracking issue)
** [https://github.com/rust-lang/rust/pull/44841 ThinLTO]
** [https://users.rust-lang.org/t/contract-opportunity-mozilla-distributed-compilation-cache-written-in-rust/13898 Distributed compilation cache]
* debugging stuff (ttromey)
* debugging stuff (ttromey)


Confirmed users
1,345

edits