Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> There's probably no way for the compiler to prove safety.

That's already the case for the AnyBitPattern stuff though. (Indeed according to the docs AnyBitPattern traits already get cast from uninitialized bytes, which in C/LLVM semantics are not necessarily frozen, even if in practice Linux would not be remapping the pages they're in).

> Rust is designed to allow 100% safe bare metal development

I wouldn't say that since bare metal rust always needs some unsafe; rather it's designed to allow managed, contained use of unsafe constructs in code that's say 98% safe. The whole purpose of this BorrowedBuf is already something like that.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: