ILibc is the C standard library implementation designed specifically for the IR0 ecosystem. It serves as the critical bridge between user applications and the System Call Interface (ABI) of the IR0 monolithic kernel.
The IR0 operating system is built on a layered architecture where ILibc plays a central role in abstracting kernel complexity for high-level processes.
graph TD
subgraph "User Space"
SHELL["Born Again Again Shell (BAASH)"]
INIT["Init Process (System Manager)"]
APPS["User Utilities"]
end
subgraph "System Library (ILibc)"
LIBC_API["Standard C Interface (POSIX-ish)"]
MEM_MGMT["Memory Manager (Free-List)"]
FS_WRAP["VFS / I/O Wrappers"]
end
subgraph "Kernel Interface (ABI)"
SYSCALL["Int 0x80 / Syscall ABI v0.5"]
end
subgraph "Kernel Space"
KERNEL["IR0 Kernel"]
VFS["Virtual File System"]
SCHED["Scheduler"]
MEM_KERNEL["Physical/Virtual Memory Management"]
end
SHELL --> LIBC_API
INIT --> LIBC_API
APPS --> LIBC_API
LIBC_API --> MEM_MGMT
LIBC_API --> FS_WRAP
MEM_MGMT --> SYSCALL
FS_WRAP --> SYSCALL
SYSCALL --> KERNEL
KERNEL --> VFS
KERNEL --> SCHED
KERNEL --> MEM_KERNEL
ILibc is more than just a collection of functions; it is the technical translation of the IR0 ABI. The kernel exposes an interrupt vector (0x80) and a specific register convention (x86_64). ILibc encapsulates these low-level operations into standard functions such as malloc(), fork(), open(), and mount(), enabling software portability within the ecosystem.
IR0 operates as a synchronized set of independent projects, each residing in its own repository but working together to form a functional operating system:
- IR0 Kernel: The monolithic core responsible for hardware abstraction and resource management.
- ILibc (This project): The shared foundation for every binary in the system.
- Init Process: The first user-space process, tasked with mounting the Unix file hierarchy and launching services.
- BAASH (Born Again Again Shell): The command-line interpreter providing the human interface.
This modularity allows for parallel development and a clear separation of concerns, ensuring that user-space remains stable regardless of internal kernel evolutions.
- Memory Allocation: A real allocator based on explicit free lists for efficient heap management.
- File Management: Full support for VFS operations (
mount,stat,chmod,link, etc.). - Process Control: Complete lifecycle management through
fork(),execve(), andwaitpid(). - Allman Convention: Source code strictly follows the Allman indentation style for maximum readability.
ILibc is a fundamental part of the effort to create a minimalist and robust Unix-like environment from scratch.