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
.
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.
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型