Comment by pizlonator

Comment by pizlonator 3 days ago

2 replies

The point still stands: rust isn’t memory safe if you use unsafe.

It’s true that to write a kernel safely, you need more than memory safety, but that’s kind if a different point. Folks don’t just use the unsafe construct in Rust to do kernely things.

junon 3 days ago

> rust isn’t memory safe if you use unsafe.

Did you read my comment at all? How do you define "memory safe"?

  • pizlonator 3 days ago

    Yeah I read it. I define memory safe as: Any program accepted by the compiler follows the typing rules of the language.

    That holds for Rust if you don’t use unsafe at all. It also holds in other memory safe languages (like JavaScript). Some memory safe languages gaurantee this without any caveats (JavaScript) while others guarantee it with caveats (Rust if you don’t use unsafe, Java if you don’t use certain APIs, etc).