GitXplorerGitXplorer
M

linux-rust-bindings

public
2 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
11583dcd3a2ac0d04447ad173ccac1002b3fbad6

Update runner deps

MMarcusGrass committed a year ago
Verified
e40ddba69452278b188230f065f27a6fba0eb17f

Bump version

MMarcusGrass committed a year ago
Verified
2bcd185e5dd1f2990b77b15840ebe507d877ac73

Update linux 6.5.5, deps, add sockaddr-in

MMarcusGrass committed a year ago
Verified
4a2383e20d666df36bfa912dc07f7653fb85d444

Update version

MMarcusGrass committed a year ago
Verified
55e328b5651431351cfb0515392d22fc1a5c8914

Update deps, update kernel, add seek constants

MMarcusGrass committed a year ago
Verified
d78255c6e9dafad7d8247deb2a1c26f3a7231d0c

Update changelog

MMarcusGrass committed a year ago

README

The README file for this repository.

Rust bindings directly from the Linux sources

Constants only, since there is to my knowledge only one way to call functions directly from the kernel, and that's through the vDSO, only constants needed to communicate through the syscall API are generated.

The generated code is separated into features based on kernel headers, structs from fcntl.h is under the feature #[cfg(feature = "fcntl)], and so forth.

Get sources

Get from git, kernel archives, or wherever.

Make nolibc from arches

[<Linux source root>/tools/include/nolibc] make ARCH=<arch-linux> OUTPUT=<here>/include-kernel-headers/<arch>/ headers_standalone.
<Linux source root> is where the linux sources are installed.
<arch-linux> is the Linux naming for the architecture, aarch64 is arm64 here.
<here> is this repo's root directory <arch> is the rust notation of the architecture, ie 64-bit arm is aarch64.

Will generate the kernel headers, mind that they are licensed under LGPL or MIT.

License

This project is licensed under MPL-2.0, see the license here.