#userspace #io #bindings #linux #epoll #no-std #libc-free

xorpio

no_std / libc-free bindings for Linux userspace IO

2 releases

new 0.0.0+1beef237e7bd295d7af8… Nov 30, 2024
0.0.0-alpha.0+efc2292 Nov 29, 2024

#432 in Unix APIs

Download history 225/week @ 2024-11-25

225 downloads per month

MIT license

4KB

xorpio

no_std / libc-free bindings for Linux userspace IO

🚧 This project is currently under development 🚧

Example Usage

#![no_std]
#![no_main]

use xorpio::epoll::Epoll;

fn run() -> Result<(), xorpio::Errno> {
    let ev = Epoll::new()?;
    let () = ev.close()?;
    Ok(())
}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    xorpio::process::exit(1)
}

#[no_mangle]
pub extern "C" fn _start() -> ! {
    let code = match run() {
        Ok(()) => 0,
        Err(_) => 1,
    };

    xorpio::process::exit(code);
}

Dependencies

~1MB