I do see that rust access to sendfile() would be via a syscall, which is in the unsafe category...so perhaps that's not the best example.
But it does make me curious how comprehensive a sandbox PL/Rust is providing, beyond just forbidding unsafe.
In Rust you'd normally be able to link c code, but calling c requires unsafe because you have to manually ensure the c code upholds any relevant Rust invariants.
> But it does make me curious how comprehensive a sandbox PL/Rust is providing, beyond just forbidding unsafe.
They also hook the compiler and try and detect shenanigans. It's not perfect, but it's pretty thought out.
*Technically the Rust standard library builds on top of a lower-level io module, which is all you have to replace.
https://tcdi.github.io/plrust/plrust.html#what-about-rust-co...
Rust keeps a list of soundness bugs via a tag on github - they're pretty common:
https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Ais...
As I read it, it seemed that the unsafe prohibition was more about the safety of the code and not the security of the system.