3 ms·
Rust uses glibc to call into the kernel like anything else. The standard library is built on top of it.
by steveklabnik 8y ago
Rust uses glibc to call into the kernel like anything else. The standard library is built on top of it.
- cyphar 8y agoRight, but does that mean it's only used as a way of getting syscall numbers (without embedding it like Go does) or is it the case that you could actually LD_PRELOAD random things like nftw(3) and it would actually affect Rust programs? I'll be honest, I haven't tried it, but it was my impression that Rust only used glibc for syscall wrappers?
- steveklabnik 8y agoWe don’t provide nftw like functionality in std, and so you can’t replace it as it would have never even been called. But for example, malloc and free are used, not sbrk directly: https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/alloc.rs https://github.com/rust-lang/rust/blob/master/src/libstd/sys...