#linux #uapi #ffi

no-std linux-raw-sys

Generated bindings for Linux's userspace API

88 releases

0.6.4 Jan 17, 2024
0.6.3 Dec 18, 2023
0.6.2 Nov 30, 2023
0.5.0 Jul 31, 2023
0.0.18 Jul 30, 2021

#1 in #userspace

Download history 2281975/week @ 2023-11-03 2407735/week @ 2023-11-10 2140741/week @ 2023-11-17 2090616/week @ 2023-11-24 2307885/week @ 2023-12-01 2345845/week @ 2023-12-08 2177778/week @ 2023-12-15 1285161/week @ 2023-12-22 1690440/week @ 2023-12-29 2297939/week @ 2024-01-05 2421765/week @ 2024-01-12 2629501/week @ 2024-01-19 2649485/week @ 2024-01-26 2638371/week @ 2024-02-02 2558513/week @ 2024-02-09 2072341/week @ 2024-02-16

10,362,084 downloads per month
Used in 18,394 crates (9 directly)

Apache-2.0…

8MB
221K SLoC

linux-raw-sys

Generated bindings for Linux's userspace API

Github Actions CI Status zulip chat crates.io page docs.rs docs

This crate contains bindgen-generated bindings for Linux's userspace API.

This is primarily of interest if you want to make raw system calls directly, which is tedious and error prone and not necessary for most use cases. For a minimal type-safe, memory-safe, and I/O-safe API to the Linux system calls built on these bindings, see the rustix crate.

The full bindings are quite large, so they've been split up into modules and cargo features. By default, general and errno are enabled, which provide most things needed by general-purpose code.

To regenerate the generated bindings, run cargo update && cd gen && cargo run --release.

Similar crates

This is similar to linux-sys, except the bindings are generated offline, rather than in a build.rs, making downstream builds simpler. And, this crate has bindings for more headers, as well as supplementary definitions not exported by Linux's headers but nonetheless needed by userspace.

Minimum Supported Rust Version (MSRV)

This crate currently works on the version of [Rust on Debian stable], which is currently Rust 1.63. This policy may change in the future, in minor version releases, so users using a fixed version of Rust should pin to a specific version of this crate.

Dependencies