Hacker News new | ask | show | jobs
by LtWorf 10 days ago
Rust is not written in rust… well it is but it needs to be bootstrapped from C.

Also it contains a ton of unsafe.

Any other wisdom you wish to share?

2 comments

You seemed to imply that the issues the comment you responded to were not memory-safety issues. But all of them were memory-safety issues. That has nothing to do with PHP or Ruby being memory-safe languages. Their underlying runtime is written in C, and that's why a bug in the runtime for a memory-safe language can still have memory-safety implications.
The Rust compiler frontend, which comprises about 99% of what you can meaningfully call the Rust language, is written in Rust

LLVM is written in C++ (not C), sure, but it's also not the only backend that exists. You could use Cranelift (written in Rust) if you want.

How do you bootstrap rust? Lisp? PHP? Or perhaps C?
How do you bootstrap C?