So to evaluate whether it's worth introducing rust, you'd ideally want to find a self-contained part of the kernel that is responsible for many CVEs and you'd want to show a substantial reduction of CVEs with the rewrite of just that component. Not impossible, but also not so easy.
https://lwn.net/Articles/822527/
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
I think this is a good criticism, but might not be true forever and is certainly something to keep in mind.
As I said in the GP, Rust will not be upstreamed into the kernel- this is one of the reasons why.
Perhaps the way to do it is to rewrite common bits that get CVEs, just so it doesn't happen again.
[0]: https://c2rust.com
EDIT: Oops, read the parent comment backwards.
We can look at actually statistics instead of just one random anecdote. For instance, according to [1], there are 2 million lines of rust code in firefox, 6 million lines of C++, and 3 million lines of C. Very roughly speaking that's 20% of the lines of low level language being in Rust.
Firefox only started requiring rust to be built about 3 years ago, this is a pretty breakneck pace of replacing C/C++ with rust.
[1] https://www.openhub.net/p/firefox/analyses/latest/languages_...
The most recent information I've found is from a Spidermonkey Dev here on HN who said they might even port the Regex engine to Rust
That didn't happen either
https://news.ycombinator.com/item?id=18988024
Something tells me that there's more than meets the eye.
Mozilla is working on replacing the wasm compiler, and eventually the compiler for "ion MIR" (an intermediate langauge that js is compiled to), with cranelift, a rust implementation of a compiler backend. See [1] for pretty pictures of this.
It's been possible to use this backend to some extent since 2018 [2]. The best place I was able to find in the last 5 minutes to describe the current state of the integration is the doc comment at the top of this file [3].
In other words it looks like spidermonkey is not not being ported, it's just not being entirely ported yet.
[1] https://github.com/bytecodealliance/wasmtime/blob/master/cra...
[2] https://old.reddit.com/r/rust/comments/9mvnrk/in_firefox_nig...
[3] https://github.com/mozilla/gecko-dev/blob/master/js/src/wasm...
Edit: Another component of spidermonkey that is being rewritten in rust is the JS parser, that project is called smooshmonkey. You can read about it in the spidermonkey news letters [4] [5] [6], and there's an nice comment describing it at the top of this reddit thread [7]
[4] https://mozilla-spidermonkey.github.io/blog/2020/01/10/newsl...
[5] https://mozilla-spidermonkey.github.io/blog/2020/03/12/newsl...
[6] https://mozilla-spidermonkey.github.io/blog/2020/05/11/newsl...
[7] https://old.reddit.com/r/rust/comments/h0ddpi/smooshmonkey_n...