On 07/10/2017 01:29 PM, Nicholas Nethercote wrote:
Hi,

Firefox now has multiple Rust components, and it's on track to get a bunch
more. See https://wiki.mozilla.org/Oxidation for details.

I think this is an excellent trend, and I've been thinking about how to
accelerate it. Here's a provocative goal worth considering: "when writing a
new compiled-code component, or majorly rewriting an existing one, Rust
should be considered / preferred / mandated."

'considered' sounds reasonable, 'preferred' or 'mandated' requires some 
reasoning.


What are the obstacles? Here are some that I've heard.

- Lack of Rust expertise for both writing and reviewing code. We have some
pockets of expertise, but these need to be expanded greatly. I've heard
that there has been some Rust training in the Paris and Toronto offices.
Would training in other offices (esp. MV and SF, given their size) be a
good idea? What about remoties?

- ARM/Android is not yet a Tier-1 platform for Rust. See
https://forge.rust-lang.org/platform-support.html and
https://internals.rust-lang.org/t/arm-android-to-tier-1/5227 for some
details.

- Interop with existing components can be difficult. IPDL codegen rust
bindings could be a big help.

ipdl? or do you mean idl? or perhaps webidl?
Also, xpconnect doesn't deal with rust, and our chrome code still heavily 
relies on idl+xpconnect.


- Compile times are high, especially for optimized builds.

Anything else?

memory management. As far as I know there is no reasonable way to deal with
cycle collection (which means also no reasonable way to have references to JS 
objects).



Nick


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to