kolibrios-syscalls 0.1.2

Running KolibriOS sysfuncs/syscalls from Rust
Documentation
  • Coverage
  • 11.11%
    1 out of 9 items documented1 out of 1 items with examples
  • Size
  • Source code size: 7.41 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 358.01 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • ilovefurnaces/rust-kolibrios-syscalls
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ilovefurnaces

KolibriOS syscalls for rust.

Use macro syscall!(&mut eax, &mut ebx, ..).

Example:

fn kolibrios_exit() -> ! {
    unsafe {
        syscall!(&mut -1);
    }
}

Using returned value(s):

use core::ffi::c_void;
unsafe fn malloc(mut size: u32) -> *mut c_void {
    //            ^----- is not actually mutated

    let mut eax = 68; //Function number
    unsafe {
        // Sysfunc 68.12, allocate memory block
        syscall!(&mut eax, &mut 12, &mut size)
    };
    eax as *mut c_void
}

Hello world: (will write to debug board)

let string = "hello world";
for i in string.bytes() {
    unsafe {
        syscall!(&mut 63, &mut 1, &mut (i as u32))
    };
}