Skip to content

IRodriguez13/ILibc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILibc: User-Space Core for IR0

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.

System Architecture

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
Loading

The Role of the ABI

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 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:

  1. IR0 Kernel: The monolithic core responsible for hardware abstraction and resource management.
  2. ILibc (This project): The shared foundation for every binary in the system.
  3. Init Process: The first user-space process, tasked with mounting the Unix file hierarchy and launching services.
  4. 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.

Implemented Features

  • 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(), and waitpid().
  • 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.

About

User-space C library for the IR0 kernel syscall ABI.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published