syscall-linux-raw

Crates.iosyscall-linux-raw
lib.rssyscall-linux-raw
version0.0.2
sourcesrc
created_at2020-07-02 22:59:12.728877
updated_at2021-03-02 23:25:49.697173
descriptionDefines syscallN methods for performing raw Linux syscalls
homepage
repositoryhttps://github.com/HeroicKatora/direct-asm
max_upload_size
id260805
size11,705
Andreas Molzer (HeroicKatora)

documentation

https://docs.rs/syscall-linux-raw

README

syscall-linux-raw

Defines syscallN methods for performing raw Linux syscalls.

What

Defines the small set of methods abstracting raw syscalls with different numbers of arguments, only available on target_os = "linux". That's it. But it works on stable and may be instructive for other syscall binary interfaces.

How

By pure magic. Jk, it defines fully assembled binary function with a proper C-abi and aliases them as callable functions with #[no_mangle], then defines a bunch of wrappers with Rust abi that should at some point be available independent of the ISA chosen in the backend.

Wtf

Indeed. Don't use in prod.

Demo?

See the example: cargo run --example simple.

Only works on x86_64-unknown-linux-* and should fail to compile on other architectures and OS's.

License

The base software: Unlicense

Commit count: 33

cargo fmt