ableos_userland/libraries/os_core/src/lib.rs

27 lines
505 B
Rust

#![no_std]
type Handle = i64;
#[repr(C)]
pub struct OSString {
pub address: i32,
pub length: i32,
}
extern "C" {
pub fn create_object(string: OSString) -> Result<Handle>;
pub fn read_object_attribute(handle: Handle, string: OSString) -> Result<OSString>;
pub fn set_object_attribute(handle: Handle, string: OSString, value: OSString) -> Result<()>;
}
#[repr(C)]
pub enum ExternErrors {
None = 0,
}
#[repr(C)]
pub struct Result<T> {
pub ok: T,
pub err: ExternErrors,
}