2 ms·
You typically don't have to write any unsafe Rust as an end user. The unsafe stuff is contained in very small and very rigorously analyzed standard library type
by Gigachad 4y ago
You typically don't have to write any unsafe Rust as an end user. The unsafe stuff is contained in very small and very rigorously analyzed standard library types. Which then provides you a safe interface to do all the stuff you normally do.
- nyanpasu64 4y agoIn practice unsafe Rust is necessary to write many classes of nontrivial code, and is harder to get right in many ways than C++ (possibly C) and I think Zig.
- Gigachad 4y agoExamples? I have been writing production rust for about 6 months now and haven’t had to use unsafe yet. Looking at the standard library internals I see it a lot but everything I have had to do works in safe.