Hacker News new | ask | show | jobs
by nercury 962 days ago
The biggest wrapper that gives guarantees is the standard library, and usually, when people say that Rust does not do something, they have standard library in mind. For example, standard library made the choice to hide panics in out-of-memory situations. That does not mean you can't write your own version of relevant structures to gain different guarantees. I like to highlight the actual strengths of Rust (as a tool) instead of particular implementation details, especially when we are talking about situation (kernel) where Rust is used without its standard library.
1 comments

Rust the language gives these guarantees without the use of the unsafe keyword:

* you will not be able to compile undefined behavior

* you will not be able to create a data race

* a shared reference is read-only

* you cannot write past the end of an array

There are others, but those are pretty big ones that both guarantees and part of the language itself, independent of stdlib.