4 ms·
Yes, Rust does depend on Clang for the lowest level of compilation at the moment. MIR (where the borrow checker lives and most of memory safety is implemented)
by timschmidt 2y ago
Yes, Rust does depend on Clang for the lowest level of compilation at the moment. MIR (where the borrow checker lives and most of memory safety is implemented) and HLR are both implemented in Rust.
What argument? Seems more like a misunderstanding to me.
- pjmlp 2y agoUsing your argument, Rust can't be fully trusted as long as its compilation model and runtime depends on having C++ somewhere. In fact, that has broken Rust compilation semantics quite a few times already.
- timschmidt 2y agoI don't think I've made any contradictory argument. Perhaps someone else did? Or maybe you assumed a binary where I see gradients. I'm quite sure I didn't claim anywhere that any language was perfectly memory safe. With Rust and Cheri we are getting closer, but there is still progress to be made. I can say that Rust is well architected such that the borrow checker and most of memory safety is implemented in the midlevel intermediate representation, which is implemented using Rust, and the bits of Clang upon which MIR and HLR are built are both well tested by virtue of being used by multiple language frontends, and limited in scope and modularity. It'd be great to see an all-rust replacement though, as bugs in Clang have been found. I believe there are several projects in the works and existing pure-Rust bootstrap compilers sufficient to get the toolchain working.