1eba8b6baSopenharmony_ci<div align="center"> 2eba8b6baSopenharmony_ci <h1><code>linux-raw-sys</code></h1> 3eba8b6baSopenharmony_ci 4eba8b6baSopenharmony_ci <p> 5eba8b6baSopenharmony_ci <strong>Generated bindings for Linux's userspace API</strong> 6eba8b6baSopenharmony_ci </p> 7eba8b6baSopenharmony_ci 8eba8b6baSopenharmony_ci <p> 9eba8b6baSopenharmony_ci <a href="https://github.com/sunfishcode/linux-raw-sys/actions?query=workflow%3ACI"><img src="https://github.com/sunfishcode/linux-raw-sys/workflows/CI/badge.svg" alt="Github Actions CI Status" /></a> 10eba8b6baSopenharmony_ci <a href="https://bytecodealliance.zulipchat.com/#narrow/stream/206238-general"><img src="https://img.shields.io/badge/zulip-join_chat-brightgreen.svg" alt="zulip chat" /></a> 11eba8b6baSopenharmony_ci <a href="https://crates.io/crates/linux-raw-sys"><img src="https://img.shields.io/crates/v/linux-raw-sys.svg" alt="crates.io page" /></a> 12eba8b6baSopenharmony_ci <a href="https://docs.rs/linux-raw-sys"><img src="https://docs.rs/linux-raw-sys/badge.svg" alt="docs.rs docs" /></a> 13eba8b6baSopenharmony_ci </p> 14eba8b6baSopenharmony_ci</div> 15eba8b6baSopenharmony_ci 16eba8b6baSopenharmony_ciThis crate contains bindgen-generated bindings for Linux's userspace API. 17eba8b6baSopenharmony_ci 18eba8b6baSopenharmony_ciThis is primarily of interest if you want to make raw system calls directly, 19eba8b6baSopenharmony_ciwhich is tedious and error prone and not necessary for most use cases. For a 20eba8b6baSopenharmony_ciminimal type-safe, memory-safe, and I/O-safe API to the Linux system calls 21eba8b6baSopenharmony_cibuilt on these bindings, see the [rustix crate]. 22eba8b6baSopenharmony_ci 23eba8b6baSopenharmony_ciThe full bindings are quite large, so they've been split up into modules and 24eba8b6baSopenharmony_cicargo features. By default, `general` and `errno` are enabled, which provide 25eba8b6baSopenharmony_cimost things needed by general-purpose code. 26eba8b6baSopenharmony_ci 27eba8b6baSopenharmony_ciTo regenerate the generated bindings, run `cargo update && cd gen && cargo run --release`. 28eba8b6baSopenharmony_ci 29eba8b6baSopenharmony_ci## Similar crates 30eba8b6baSopenharmony_ci 31eba8b6baSopenharmony_ciThis is similar to [linux-sys], except the bindings are generated offline, 32eba8b6baSopenharmony_cirather than in a build.rs, making downstream builds simpler. And, this crate 33eba8b6baSopenharmony_cihas bindings for more headers, as well as supplementary definitions not 34eba8b6baSopenharmony_ciexported by Linux's headers but nonetheless needed by userspace. 35eba8b6baSopenharmony_ci 36eba8b6baSopenharmony_ci# Minimum Supported Rust Version (MSRV) 37eba8b6baSopenharmony_ci 38eba8b6baSopenharmony_ciThis crate currently works on the version of [Rust on Debian stable], which is 39eba8b6baSopenharmony_cicurrently Rust 1.48. This policy may change in the future, in minor version 40eba8b6baSopenharmony_cireleases, so users using a fixed version of Rust should pin to a specific 41eba8b6baSopenharmony_civersion of this crate. 42eba8b6baSopenharmony_ci 43eba8b6baSopenharmony_ci[linux-sys]: https://crates.io/crates/linux-sys 44eba8b6baSopenharmony_ci[rustix crate]: https://github.com/bytecodealliance/rustix#linux-raw-syscall-support 45