Maybe you think the above is overkill, but it is basically what one has to do to use seccomp-bpf most effectively.
seccomp-bpf is a very good point I hadn’t thought of! I guess this means you need to know exactly what the system calls are, and you don’t want e.g. open being rewritten to openat(...AT_FDCWD) behind your back.
Incidentally, Issue 24975, Audit and document the system calls made for each “primitive” IO API, sounds relevant to this discussion.
Note that almost all people I’ve asked “Go or Rust for server-side development” have answered “Go”. There are lots of reasons for this, but one is particularly relevant here: They don’t have to worry about DLL hell when compiling a Go program and then deploying it on their systems because Go executables are (usually) self-contained.
But so are Rust executables! Rust-language dependencies are statically linked; it’s only libc, plus any other third-party crates that are dynamically linking third-party C libraries. If you’re running pure-Rust code, you shouldn’t have DLL hell per se. The only thing they depend on is the platform (kernel + libc).
If the problem is Rust binaries that are depending on a newer version of glibc (via symbol versioning), it seems like it should be doable to get rustc to build things that only require an older glibc. At least, this is a relatively smalla mount of work compared to the work of implementing an entire libc. I’m assuming that the target systems do have a glibc, just an older one (e.g., RHEL 5 has glibc 2.5), but if there’s a use case for systems with no glibc installed (empty chroots/containers? Android?) then this wouldn’t work.