3 ms·
Is Rust itself 100% written in Rust yet?
by no_wizard 2y ago
Is Rust itself 100% written in Rust yet?
- ramon156 2y agoClose! Depends what you call 100% I suppose. Even C isnt 100% C
- estebank 2y agoI suspect they are arguing that it is not because the default codegen backend produces LLVM IR, which C++ code turns into the final executable. The Cranelift backend which is pure Rust exists, but because it is not the default some people discount it. I personally believe that leveraging existing codegen infrastructure is sound engineering. Having a "pure" implementation is not a goal of the project, having solid tooling is. That might translate in the future to tackling codegen more directly, but it isn't a huge pain point today.
- no_wizard 2y agoThe real contention is how do you know it’s memory safe if Rust itself isn’t pure safe Rust?
- steveklabnik 2y agoBecause that’s not really relevant; Java is a memory safe language and the JVM is written in C++, Ruby is a memory safe language and it’s written in C.
- no_wizard 2y agoBoth of those have had memory related exploits, as I recall
- steveklabnik 2y agoBugs happen. That’s true of any program.
- LowLevelMahn 2y agorustc is written in Rust - for many years, start based on OCaml