linux-sys

Crates.iolinux-sys
lib.rslinux-sys
version0.0.1-pre+5.4.0
sourcesrc
created_at2019-12-25 12:36:40.716458
updated_at2020-01-30 16:23:52.15347
descriptionFFI bindings to linux UAPI
homepage
repositoryhttps://github.com/elichai/syscalls-rs/tree/master/linux-sys
max_upload_size15728640
id192323
size45,042,910
Elichai Turkel (elichai)

documentation

README

linux-sys - raw auto generated FFI bindings to Linux UAPI headers

Build Status Latest version License dependency status License

linux-sys provides the correct headers to access linux user-api directly.
All the types in this crate are autogenerated at compile time and will have different types per platform. The fact that you see type Foo = u8 doesn't mean you can just use u8, you have to use Foo as on some platforms it might be i8 or u32.

Please open issues if there's any typedef/struct missing that you'd like (currently contains only the major headers for technical reasons https://sourceware.org/glibc/wiki/Synchronizing_Headers)

Note this aren't necessarily libc compatible, and if you need to work with lib please see the libc crate.

Usage

The versions in this crate match the Linux Kernel version that was used to generate the headers.

Add this to your Cargo.toml:

[dependencies]
linux-sys = "5.4"

Features

  • cty - By default std::os::raw is used to get C fundamental types(e.g. long, int etc.) the cty feature replaces libstd with cty crate

Minimum Supported Rust Version (MSRV)

Currently it officially supports only rust nightly, because most interaction with the kernel requires assembly anyway. In practice both beta and stable are tested in the CI. but I do plan to add an autodetect feature to bindgen] such that it will work with whatever version bindgen] can generate for.

Commit count: 0

cargo fmt