90 releases

0.6.5 Aug 16, 2024
0.6.4 Jan 17, 2024
0.6.3 Dec 18, 2023
0.6.2 Nov 30, 2023
0.0.18 Jul 30, 2021

#95 in Unix APIs

Download history 2914057/week @ 2024-08-21 2792717/week @ 2024-08-28 3020987/week @ 2024-09-04 2843864/week @ 2024-09-11 2873766/week @ 2024-09-18 3073502/week @ 2024-09-25 3372438/week @ 2024-10-02 3330110/week @ 2024-10-09 3381174/week @ 2024-10-16 2843411/week @ 2024-10-23 2687926/week @ 2024-10-30 2653135/week @ 2024-11-06 2849290/week @ 2024-11-13 2794108/week @ 2024-11-20 2510937/week @ 2024-11-27 2385055/week @ 2024-12-04

11,026,219 downloads per month
Used in 24,182 crates (12 directly)

Apache-2.0…

10MB
287K 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