# rbrt: the Foundry OS Rust runtime `ulib.rs` is the tiny runtime every Foundry OS Rust program includes: raw Rustbelt/Linux syscall wrappers, `print!`/`println!`/`eprintln!`, a `brk` heap (so `Vec` and `String` work), the `_start` entry point that calls the program's `fn main() -> i64`, and the panic handler. For milestone M1 it is still included as a *module* (`#[path = ...] mod ulib;`), exactly as in the kernel repo, so the programs compile unchanged. Milestone M1b turns it into a real library crate (`#[macro_export]` macros, `#[panic_handler]`, `#[global_allocator]`). `build.rs` here is the build script shared by all packages: it adds `-T rust/link.ld` to the link. The kernel repo keeps its own frozen copy of `ulib.rs` for its ABI test programs (hello, forktest, ...), so the two copies may drift apart; that is intended.