OS
Source: std/os.mw.
The thin layer between the standard library and the operating system. The functions sys_read, sys_write, sys_mmap_anon and so on come from the platform layer.
Raw Linux system calls, no libc involved. The numbers and the syscall stub are picked per target (--target, default: the host). Compile programs that use only this module with marrow --nostdlib.
Functions
Section titled “Functions”os_strlen
Section titled “os_strlen”fn os_strlen(s: *u8) -> u64os_write_all
Section titled “os_write_all”fn os_write_all(fd: i32, buf: *u8, len: i64) -> i64Writes the whole buffer, retrying on partial writes. Returns 0 on success.
os_print
Section titled “os_print”fn os_print(s: *u8)os_println
Section titled “os_println”fn os_println(s: *u8)os_eprint
Section titled “os_eprint”fn os_eprint(s: *u8)