23 releases

new 0.6.2 Jun 30, 2022
0.6.0 May 23, 2022
0.5.0 Oct 18, 2021
0.3.5 Jul 29, 2021
0.1.4 Oct 1, 2019

#85 in Unix APIs

Download history 3151/week @ 2022-03-11 3289/week @ 2022-03-18 3185/week @ 2022-03-25 3212/week @ 2022-04-01 3137/week @ 2022-04-08 3294/week @ 2022-04-15 3084/week @ 2022-04-22 1670/week @ 2022-04-29 641/week @ 2022-05-06 843/week @ 2022-05-13 637/week @ 2022-05-20 537/week @ 2022-05-27 440/week @ 2022-06-03 377/week @ 2022-06-10 460/week @ 2022-06-17 470/week @ 2022-06-24

1,880 downloads per month
Used in 2 crates

BSD-2-Clause

210KB
7K SLoC

syscalls

Crates.io docs.rs License

This is a low-level library for listing and invoking raw Linux system calls.

Features

  • Provides of all syscalls for multiple architectures (see table below).
  • Provides methods for invoking raw syscalls.
  • Provides an Errno type for Rustic error handling.

Feature Flags

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 }

with-serde

Various types can be serialized with Serde. This can be enabled with:

syscalls = { version = "0.6", features = ["with-serde"] }

Architecture Support

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 N/A
mips No ❌
mips64 No ❌
powerpc No ❌
powerpc64 No ❌
s390x No ❌
sparc N/A
sparc64 N/A
x86 Yes ✅
x86_64 Yes ✅

Updating the syscall list

Updates are pulled from the .tbl files in the Linux source tree.

  1. Change the Linux version in syscalls-gen/src/main.rs to the latest version. Using a release candidate version is OK.
  2. Run cd syscalls-gen && cargo run. This will regenerate the syscall tables in src/arch/.

Dependencies

~0–305KB