#linux #uapi #ffi

no-std linux-raw-sys

Generated bindings for Linux’s userspace API

47 releases

0.0.46 Apr 19, 2022
0.0.42 Feb 11, 2022
0.0.36 Nov 5, 2021
0.0.18 Jul 30, 2021

#1 in #uapi

Download history 39870/week @ 2022-03-15 41060/week @ 2022-03-22 45706/week @ 2022-03-29 46571/week @ 2022-04-05 41047/week @ 2022-04-12 45886/week @ 2022-04-19 46660/week @ 2022-04-26 46479/week @ 2022-05-03 56347/week @ 2022-05-10 56597/week @ 2022-05-17 51191/week @ 2022-05-24 50206/week @ 2022-05-31 55666/week @ 2022-06-07 55046/week @ 2022-06-14 59129/week @ 2022-06-21 50825/week @ 2022-06-28

229,549 downloads per month
Used in 231 crates (2 directly)

Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT

4.5MB
116K 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.48. 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