5 ms·
Yes, inertia. If those projects started today, they would likely choose rust.
by surajrmal 7mo ago
Yes, inertia. If those projects started today, they would likely choose rust.
- pjmlp 7mo agoWhy isn't rustc using Cranelift then?
- norman784 7mo agoI 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)
- pjmlp 7mo agoSo 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.
- andriy_koval 7mo ago> 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.
- pjmlp 7mo agoWhere are the LLVM pull requests adding Rust code?
- andriy_koval 7mo agoI am not expert in compilers, but in databases space there are multiple prominent projects which gain traction, create ecosystem and making Rust strong contender against C++ dominance.
- nindalf 7mo agoSame 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.
- pjmlp 7mo agoRust 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.
- nindalf 7mo agoRust will never be in Android user space, because it's not competing with Kotlin. Kotlin is already excellent there. Rust will replace the parts of Android written in C++ gradually. That was always the plan. It feels weird and cope-y to move the goalposts to say it's not a big deal unless Rust also replaces Kotlin. Chrome only needs to replace the parts of their codebase that handle untrusted input with Rust to get substantial benefits. Like codec parsers. They don't need to rewrite everything, just the parts that need rewriting. The parts that are impossible to get right in C++, to the point where Chrome spins up separate processes to run that code. Rust is the future for Android, and it will become an important of Chrome and Linux and git (starting 3.0). That's just the way it is.