Hacker News new | past | comments | ask | show | jobs | submit
Why isn't rustc using Cranelift then?
Same reason Android and Chrome and git and Linux weren't written in Rust when they started. Rust didn't exist. All of these projects integrate Rust now, after being single language projects for the longest time.

It's notable that the projects you mentioned mostly don't need to deal with adversarial user input, while the projects I mentioned do. That's one area that Rust shines in.

Rust presence in Android is minimal, and not officially supported for userspace.

Android team is quite clear that Java, Kotlin, C and C++ are the official languages for app developers.

Chrome even has less Rust than Firefox.

Linux has some baby adoption, and it isn't without drama, even with Microsoft and Google pushing for it.

loading story #47337136
I can think a few reasons:

- Cranelift applies less optimizations in exchange for faster compilation times, because it was developed to compile WASM (wasmtime), but turns out that is good enough for Rust debug builds.

- Cranelift does not support the wide range of platforms (AFAIK just X86_64 and some ARM targets)

So it isn't just a matter of "they would use Rust instead".

There is a whole ecosystem of contributions across the globe and the lingua franca used by those contributors.

> There is a whole ecosystem of contributions across the globe and the lingua franca used by those contributors.

which is slowly changing with wider rust adaptation.

loading story #47340378