std.freestanding
for a program built with –target freestanding, which has no os under it
set_output
Section titled “set_output”pub set_output :: fn(write: extern fn(*const u8, usize))println and the panic message go to write, e.g. a serial port; nothing is printed before
pub halt :: fn()interrupts off, halted for good
add_memory
Section titled “add_memory”pub add_memory :: fn(base: usize, len: usize)gives zones the memory [base, base + len), e.g. a free range of the boot loader’s memory map; it must be memory nothing else uses. before any is given, and after it runs out, zones take a 1 MiB static heap
free_memory
Section titled “free_memory”pub free_memory :: fn() -> usizethe bytes zones can still take