Crates.io | syscalls |
lib.rs | syscalls |
version | 0.6.18 |
source | src |
created_at | 2019-09-06 19:00:07.262009 |
updated_at | 2024-03-16 03:05:20.397728 |
description | A list of Linux system calls. |
homepage | https://github.com/jasonwhite/syscalls |
repository | https://github.com/jasonwhite/syscalls |
max_upload_size | |
id | 162841 |
size | 890,551 |
This is a low-level library for listing and invoking raw Linux system calls.
Errno
type for Rustic error handling.SysnoSet
and SysnoMap
types.The features that are enabled by default include std
and serde
.
std
By default, std
support is enabled. If you wish to compile in a no_std
environment, use:
syscalls = { version = "0.6", default-features = false }
serde
Various types can be serialized with Serde. This can be enabled with:
syscalls = { version = "0.6", features = ["serde"] }
full
Enables all extra features.
all
Enables syscall tables for all architectures. If you don't need all
architectures, you can enable them individually with features like arm
, x86
,
powerpc
, etc. See the Architecture Support table below for a full list of
available architectures.
The Enum column means that a Sysno
enum is implemented for this
architecture.
The Invoke column means that syscalls can be invoked for this architecture.
The Stable Rust? column means that syscall invocation only requires stable Rust. Some architectures require nightly Rust because inline assembly is not yet stabilized for all architectures.
Arch | Enum | Invoke | Stable Rust? |
---|---|---|---|
arm * |
✅ | ✅ | Yes ✅ |
aarch64 |
✅ | ✅ | Yes ✅ |
mips |
✅ | ✅ | No ❌ |
mips64 |
✅ | ✅ | No ❌ |
powerpc |
✅ | ✅ | No ❌ |
powerpc64 |
✅ | ✅ | No ❌ |
riscv32 |
✅ | ❌† | No ❌ |
riscv64 |
✅ | ✅ | Yes ✅ |
s390x |
✅ | ✅ | No ❌ |
sparc |
✅ | ❌ | N/A |
sparc64 |
✅ | ❌ | N/A |
x86 |
✅ | ✅ | Yes ✅ |
x86_64 |
✅ | ✅ | Yes ✅ |
* Includes ARM thumb mode support.
† Rust does not support riscv32 Linux targets, but syscall functions are implemented if you're feeling adventurous.
Updates are pulled from the .tbl
files in the Linux source tree.
syscalls-gen/src/main.rs
to the latest
version. Only update to the latest stable version (not release candidates).cd syscalls-gen && cargo run
. This will regenerate the syscall tables
in src/arch/
.