raw-syscall-enumerated

Crates.ioraw-syscall-enumerated
lib.rsraw-syscall-enumerated
version0.7.6
sourcesrc
created_at2018-10-04 18:33:59.01094
updated_at2018-10-04 18:33:59.01094
descriptionLow-level raw system calls enumerated.
homepage
repository
max_upload_size
id88063
size72,857
Anti Revoluzzer (rvlzzr)

documentation

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

README

raw-syscall-enumerated

Low level system calls.

Latest version Documentation Downloads License

Usage

Add the following to your Cargo.toml:

raw-syscall-enumerated = "0.7.6"

Supported Platforms

  • x86_64-linux

Purpose

This crate builds on raw-syscall-base, providing a function for each system call on the platform.

All functions are marked unsafe, and no validation is done on arguments or return values.

All arguments and return values use the most basic possible types, for example everything is usize on x86_64-linux. All arguments must be converted to this type, and it's up to the caller to determine whether the result represents a pointer or error code or whatever.

All system calls through the latest release of the platform should be supported here. Deprecated system calls should be supported as well. It is up to higher level libraries to check the platform version and prevent unsupported calls from being made if this is desired.

The intention is to provide a minimal stable base with no unnecessary overhead on which to build a higher-level library.

x86_64-linux Example

    use raw_syscall_enumerated::{write, exit_group};
    
    // attempts to write "hello" to STDOUT
    pub unsafe fn hello() -> usize {
        write(1, b"hello" as *const u8 as usize, 5)
    }

    // exits the program with a success code 
    pub unsafe fn exit_success() -> ! {
        exit_group(0)
    }
Commit count: 0

cargo fmt