logoalt Hacker News

pjmlpyesterday at 8:34 AM2 repliesview on HN

Why isn't rustc using Cranelift then?


Replies

norman784yesterday at 8:57 AM

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)

show 1 reply
nindalfyesterday at 2:52 PM

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.

show 1 reply