A library to easily deal with linux system calls.
As a side effect this library offers other utilities.
This library invoke uname
syscall in initialization and cache its result.
Parse kernel version from uname
in initialization (panics if it's invalid)
and offers a macro kversion!
to deal with it.
Detect auxiliary vector (if present) in initialization and offer a Rust
interface to query its values. Useful for hardware/kernel features
like scv
in ppc64.
Detect vDSO and parse it (if present) in initialization and store its result.
Useful for vsyscalls on any platform and __kernel_vsyscall
for faster
syscalls on x86 machines.
std
: enable std support.bare
: do not try to automatically initialize the library.libc-compat
: forward this feature tolinux-errnos
.
Enable #![no_std]
support by disabling the default std
feature:
[dependencies]
linux-syscalls = { version = "*", default-features = false }
- aarch64-unknown-linux-gnu
- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-musl
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- arm-unknown-linux-musleabi
- arm-unknown-linux-musleabihf
- armv5te-unknown-linux-gnueabi
- armv5te-unknown-linux-musleabi
- armv7-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- armv7-unknown-linux-musleabi
- armv7-unknown-linux-musleabihf
- i586-unknown-linux-gnu
- i586-unknown-linux-musl
- i686-unknown-linux-musl
- loongarch64-unknown-linux-gnu
- mips-unknown-linux-gnu (not tested)
- mips-unknown-linux-musl (not tested)
- mips64-unknown-linux-gnuabi64 (not tested)
- mips64-unknown-linux-muslabi64 (not tested)
- mips64el-unknown-linux-gnuabi64 (not tested)
- mips64el-unknown-linux-muslabi64 (not tested)
- mipsel-unknown-linux-gnu (not tested)
- mipsel-unknown-linux-musl (not tested)
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- s390x-unknown-linux-gnu
- thumbv7neon-unknown-linux-gnueabihf
- x86_64-unknown-linux-musl
1.65.0