3 ms·
Outside of FFI, is that mostly just for performance optimization? EDIT: IOW, why don't projects just eschew unsafe in order to truly leverage one of Rust's pri
by n8henrie 3y ago
Outside of FFI, is that mostly just for performance optimization?
EDIT: IOW, why don't projects just eschew unsafe in order to truly leverage one of Rust's primary claims to fame?
- vlovich123 3y agoFFI, performance, ownership that’s impossible to express statically, 3p dependencies, direct OS calls or HW management that aren't available with safe wrappers etc. Sticking to safe rust is an ideal and it should be a goal but the primary use is to accomplish a task. If safe rust is getting in the way and there’s no way to do it easily otherwise, don’t feel bad about unsafe. The amount of unsafe should be minimized of course which reduces the surface area of issues greatly compared with c/C++ where every line is unsafe. Practical code is always >> ideological purity.