3 ms·
Rust already guarantees zero overhead, and close to zero boilerplate, for FFI calls into C. However, there's no fundamental reason Rust can't be a viable repla
by dbaupp 11y ago
Rust already guarantees zero overhead, and close to zero boilerplate, for FFI calls into C.
However, there's no fundamental reason Rust can't be a viable replacement language for C for these sort of things. As one example, I think it would be great to have Rust used more in the numeric/scientific computing space, where a lot of code is written by non-expert programmers (i.e. don't mix well with C/C++ to get reliable software), so having a compiler looking out is possibly nice.
Also, it should be possible to replace a C component with a Rust one in essentially a drop-in zero-overhead way since Rust can trivially expose a C-compatible interface.