4 Star 0 Fork 5

OpenHarmony / third_party_rust_linux-raw-sys

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

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.

Short version for non-lawyers: `linux-raw-sys` is triple-licensed under Apache 2.0 with the LLVM Exception, Apache 2.0, and MIT terms. Longer version: Copyrights in the `linux-raw-sys` project are retained by their contributors. No copyright assignment is required to contribute to the `linux-raw-sys` project. Some files include code derived from Rust's `libstd`; see the comments in the code for details. Except as otherwise noted (below and/or in individual files), `linux-raw-sys` is licensed under: - the Apache License, Version 2.0, with the LLVM Exception <LICENSE-Apache-2.0_WITH_LLVM-exception> or <http://llvm.org/foundation/relicensing/LICENSE.txt> - the Apache License, Version 2.0 <LICENSE-APACHE> or <http://www.apache.org/licenses/LICENSE-2.0>, - or the MIT license <LICENSE-MIT> or <http://opensource.org/licenses/MIT>, at your option.

简介

"提供与 Linux 内核原始设备接口的绑定。 | A Rust library that provides bindings to the Linux kernel's raw device interface." 展开 收起
Rust 等 3 种语言
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openharmony/third_party_rust_linux-raw-sys.git
git@gitee.com:openharmony/third_party_rust_linux-raw-sys.git
openharmony
third_party_rust_linux-raw-sys
third_party_rust_linux-raw-sys
master

搜索帮助