3 ms·
> This is a bit different from Linux, where the abstractions are layered the other way round: the OS (POSIX) spec mostly assumes an existing libc. FWIW the POS
by ylyn 5y ago
> This is a bit different from Linux, where the abstractions are layered the other way round: the OS (POSIX) spec mostly assumes an existing libc.
FWIW the POSIX spec assumes libc, but on Linux specifically the syscall interface is stable.
- sanxiyn 5y agoNote that macOS syscall interface is specifically unstable so Rust needs POSIX/libc path anyway.
- masklinn 5y agoAlso on Solaris/Illumos/SmartOS/..., and on OpenBSD (where it's more or less verboten entirely since system-call-origin verification).
- wahern 5y agoAFAIU, you don't need to use libc on OpenBSD, however only one contiguous region of code is permitted to invoke syscalls, and so you can't mix-and-match ad hoc libraries. See https://man.openbsd.org/msyscall https://man.openbsd.org/msyscall, which implements one-time registration of a contiguous range of pages permitted to invoke syscalls.
- codeflo 5y agoThanks, that’s a great correction/clarification.