Skip to content

Project Structure

This document provides a comprehensive overview of the SAGE OS project structure, explaining the role and purpose of each directory and key files.

๐Ÿ“ Root Directory Structure

SAGE-OS/
โ”œโ”€โ”€ ๐Ÿ“„ README.md                    # Project overview and quick start
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE                      # BSD 3-Clause license
โ”œโ”€โ”€ ๐Ÿ“„ COMMERCIAL_TERMS.md          # Commercial licensing terms
โ”œโ”€โ”€ ๐Ÿ“„ CONTRIBUTING.md              # Contribution guidelines
โ”œโ”€โ”€ ๐Ÿ“„ SECURITY.md                  # Security policy and reporting
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Rust workspace configuration
โ”œโ”€โ”€ ๐Ÿ“„ Makefile                     # Main build system
โ”œโ”€โ”€ ๐Ÿ“„ mkdocs.yml                   # Documentation configuration
โ”œโ”€โ”€ ๐Ÿ“„ .gitignore                   # Git ignore patterns
โ”œโ”€โ”€ ๐Ÿ“„ .gitattributes               # Git attributes
โ”œโ”€โ”€ ๐Ÿฅพ bootloader/                  # Bootloader implementation
โ”œโ”€โ”€ ๐Ÿง  kernel/                      # Kernel source code
โ”œโ”€โ”€ ๐Ÿ‘ฅ userspace/                   # User space applications
โ”œโ”€โ”€ ๐Ÿ”ง tools/                       # Development and build tools
โ”œโ”€โ”€ ๐Ÿ“š docs/                        # Documentation source
โ”œโ”€โ”€ ๐Ÿงช tests/                       # Test suites
โ”œโ”€โ”€ ๐Ÿ“ฆ scripts/                     # Build and utility scripts
โ”œโ”€โ”€ ๐Ÿ—๏ธ build/                       # Build artifacts (generated)
โ”œโ”€โ”€ ๐Ÿ“€ dist/                        # Distribution files (generated)
โ””โ”€โ”€ ๐Ÿ”ง .github/                     # GitHub workflows and templates

๐Ÿฅพ Bootloader (bootloader/)

The bootloader directory contains the multi-stage boot process implementation.

bootloader/
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Bootloader workspace
โ”œโ”€โ”€ ๐Ÿ“„ Makefile                     # Bootloader build system
โ”œโ”€โ”€ ๐Ÿ”ง stage1/                      # First stage bootloader
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # Stage 1 configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ src/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.rs              # Stage 1 entry point
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ boot.s               # Assembly boot code
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ lib.rs               # Stage 1 library
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ linker.ld                # Linker script
โ”œโ”€โ”€ ๐Ÿ”ง stage2/                      # Second stage bootloader
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # Stage 2 configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ src/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.rs              # Stage 2 entry point
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ memory.rs            # Memory detection
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ disk.rs              # Disk I/O
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ elf.rs               # ELF loader
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ graphics.rs          # Graphics initialization
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ linker.ld                # Linker script
โ”œโ”€โ”€ ๐Ÿ”ง uefi/                        # UEFI boot support
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # UEFI configuration
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ src/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.rs              # UEFI entry point
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ protocols.rs         # UEFI protocols
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ services.rs          # UEFI services
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ build.rs                 # Build script
โ””โ”€โ”€ ๐Ÿ”ง common/                      # Shared bootloader code
    โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # Common library
    โ””โ”€โ”€ ๐Ÿ“„ src/
        โ”œโ”€โ”€ ๐Ÿ“„ lib.rs               # Common library
        โ”œโ”€โ”€ ๐Ÿ“„ console.rs           # Console output
        โ”œโ”€โ”€ ๐Ÿ“„ memory_map.rs        # Memory mapping
        โ””โ”€โ”€ ๐Ÿ“„ boot_info.rs         # Boot information

Key Files

File Purpose Architecture Support
stage1/src/boot.s Initial assembly boot code x86_64, ARM64
stage2/src/main.rs Extended bootloader logic All
uefi/src/main.rs UEFI boot implementation x86_64, ARM64
common/src/boot_info.rs Boot information structure All

๐Ÿง  Kernel (kernel/)

The kernel directory contains the core operating system implementation.

kernel/
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Kernel workspace
โ”œโ”€โ”€ ๐Ÿ“„ Makefile                     # Kernel build system
โ”œโ”€โ”€ ๐Ÿ“„ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ main.rs                  # Kernel entry point
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ lib.rs                   # Kernel library
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ panic.rs                 # Panic handler
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ allocator.rs             # Memory allocator
โ”œโ”€โ”€ ๐Ÿ—๏ธ arch/                        # Architecture-specific code
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ง x86_64/                  # x86_64 implementation
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs               # Architecture module
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ boot.rs              # Boot initialization
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ interrupts.rs        # Interrupt handling
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ memory.rs            # Memory management
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ gdt.rs               # Global Descriptor Table
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ idt.rs               # Interrupt Descriptor Table
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ paging.rs            # Page table management
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ syscalls.rs          # System call interface
โ”‚   โ”œโ”€โ”€ ๐Ÿ”ง aarch64/                 # ARM64 implementation
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs               # Architecture module
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ boot.rs              # Boot initialization
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ exceptions.rs        # Exception handling
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ memory.rs            # Memory management
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mmu.rs               # Memory Management Unit
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ syscalls.rs          # System call interface
โ”‚   โ””โ”€โ”€ ๐Ÿ”ง riscv64/                 # RISC-V implementation
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ mod.rs               # Architecture module
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ boot.rs              # Boot initialization
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ traps.rs             # Trap handling
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ memory.rs            # Memory management
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ paging.rs            # Page table management
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ syscalls.rs          # System call interface
โ”œโ”€โ”€ ๐Ÿ”ง drivers/                     # Device drivers
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # Driver module
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ console.rs               # Console driver
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ keyboard.rs              # Keyboard driver
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mouse.rs                 # Mouse driver
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ storage.rs               # Storage drivers
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ network.rs               # Network drivers
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ graphics.rs              # Graphics drivers
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ usb.rs                   # USB drivers
โ”œโ”€โ”€ ๐Ÿ”ง fs/                          # File system implementation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # File system module
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ vfs.rs                   # Virtual File System
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ext4.rs                  # EXT4 file system
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ fat32.rs                 # FAT32 file system
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ tmpfs.rs                 # Temporary file system
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ procfs.rs                # Process file system
โ”œโ”€โ”€ ๐Ÿ”ง mm/                          # Memory management
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # Memory module
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ allocator.rs             # Kernel allocator
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ vmm.rs                   # Virtual memory manager
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ pmm.rs                   # Physical memory manager
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ heap.rs                  # Heap management
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ slab.rs                  # Slab allocator
โ”œโ”€โ”€ ๐Ÿ”ง proc/                        # Process management
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # Process module
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ scheduler.rs             # Process scheduler
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ task.rs                  # Task management
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ thread.rs                # Thread management
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ipc.rs                   # Inter-process communication
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ signal.rs                # Signal handling
โ”œโ”€โ”€ ๐Ÿ”ง net/                         # Network stack
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # Network module
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ethernet.rs              # Ethernet protocol
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ip.rs                    # IP protocol
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ tcp.rs                   # TCP protocol
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ udp.rs                   # UDP protocol
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ socket.rs                # Socket interface
โ””โ”€โ”€ ๐Ÿ”ง sync/                        # Synchronization primitives
    โ”œโ”€โ”€ ๐Ÿ“„ mod.rs                   # Sync module
    โ”œโ”€โ”€ ๐Ÿ“„ mutex.rs                 # Mutex implementation
    โ”œโ”€โ”€ ๐Ÿ“„ rwlock.rs                # Read-write lock
    โ”œโ”€โ”€ ๐Ÿ“„ semaphore.rs             # Semaphore
    โ””โ”€โ”€ ๐Ÿ“„ atomic.rs                # Atomic operations

Architecture-Specific Code

Each architecture has its own subdirectory with platform-specific implementations:

=== "x86_64" - Boot: GRUB multiboot and UEFI support - Interrupts: IDT and interrupt handlers - Memory: Paging with 4-level page tables - System Calls: SYSCALL/SYSRET instructions

=== "ARM64" - Boot: Device tree and UEFI support - Exceptions: Exception level handling - Memory: ARMv8 MMU with translation tables - System Calls: SVC instruction

=== "RISC-V" - Boot: OpenSBI and device tree support - Traps: Supervisor trap handling - Memory: Sv48 virtual memory - System Calls: ECALL instruction

๐Ÿ‘ฅ User Space (userspace/)

User space applications and system services.

userspace/
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Userspace workspace
โ”œโ”€โ”€ ๐Ÿ”ง init/                        # Init system
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # Init configuration
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ src/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ main.rs              # Init process
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ service.rs           # Service management
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ config.rs            # Configuration parser
โ”œโ”€โ”€ ๐Ÿ”ง shell/                       # Command shell
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml               # Shell configuration
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ src/
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ main.rs              # Shell main
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ parser.rs            # Command parser
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ builtins.rs          # Built-in commands
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ history.rs           # Command history
โ”œโ”€โ”€ ๐Ÿ”ง utils/                       # System utilities
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ls/                      # List directory
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cat/                     # Display file contents
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cp/                      # Copy files
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mv/                      # Move files
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ rm/                      # Remove files
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ mkdir/                   # Create directory
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ rmdir/                   # Remove directory
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ps/                      # Process status
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ top/                     # System monitor
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ mount/                   # Mount file systems
โ”œโ”€โ”€ ๐Ÿ”ง libs/                        # User space libraries
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ libc/                    # C standard library
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ libstd/                  # Standard library
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ libsage/                 # SAGE OS specific library
โ””โ”€โ”€ ๐Ÿ”ง apps/                        # Applications
    โ”œโ”€โ”€ ๐Ÿ“„ editor/                  # Text editor
    โ”œโ”€โ”€ ๐Ÿ“„ calculator/              # Calculator
    โ””โ”€โ”€ ๐Ÿ“„ file_manager/            # File manager

๐Ÿ”ง Tools (tools/)

Development and build tools.

tools/
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Tools workspace
โ”œโ”€โ”€ ๐Ÿ”ง build-tools/                 # Build utilities
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ iso-creator/             # ISO image creator
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cross-compiler/          # Cross-compilation setup
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ qemu-runner/             # QEMU test runner
โ”œโ”€โ”€ ๐Ÿ”ง debug-tools/                 # Debugging utilities
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ gdb-scripts/             # GDB debugging scripts
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ memory-analyzer/         # Memory analysis tool
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ trace-viewer/            # Execution trace viewer
โ””โ”€โ”€ ๐Ÿ”ง dev-tools/                   # Development utilities
    โ”œโ”€โ”€ ๐Ÿ“„ code-formatter/          # Code formatting tool
    โ”œโ”€โ”€ ๐Ÿ“„ license-checker/         # License compliance checker
    โ””โ”€โ”€ ๐Ÿ“„ doc-generator/           # Documentation generator

๐Ÿ“š Documentation (docs/)

Documentation source files and assets.

docs/
โ”œโ”€โ”€ ๐Ÿ“„ index.md                     # Main documentation page
โ”œโ”€โ”€ ๐Ÿ”ง getting-started/             # Getting started guides
โ”œโ”€โ”€ ๐Ÿ”ง architecture/                # Architecture documentation
โ”œโ”€โ”€ ๐Ÿ”ง components/                  # Component documentation
โ”œโ”€โ”€ ๐Ÿ”ง development/                 # Development guides
โ”œโ”€โ”€ ๐Ÿ”ง security/                    # Security documentation
โ”œโ”€โ”€ ๐Ÿ”ง files/                       # File reference
โ”œโ”€โ”€ ๐Ÿ”ง api/                         # API documentation
โ”œโ”€โ”€ ๐Ÿ”ง tutorials/                   # Tutorials
โ”œโ”€โ”€ ๐Ÿ”ง troubleshooting/             # Troubleshooting guides
โ”œโ”€โ”€ ๐Ÿ”ง assets/                      # Images and assets
โ”œโ”€โ”€ ๐Ÿ”ง stylesheets/                 # Custom CSS
โ””โ”€โ”€ ๐Ÿ”ง javascripts/                 # Custom JavaScript

๐Ÿงช Tests (tests/)

Test suites and testing infrastructure.

tests/
โ”œโ”€โ”€ ๐Ÿ“„ Cargo.toml                   # Test workspace
โ”œโ”€โ”€ ๐Ÿ”ง unit/                        # Unit tests
โ”œโ”€โ”€ ๐Ÿ”ง integration/                 # Integration tests
โ”œโ”€โ”€ ๐Ÿ”ง system/                      # System tests
โ”œโ”€โ”€ ๐Ÿ”ง performance/                 # Performance tests
โ”œโ”€โ”€ ๐Ÿ”ง security/                    # Security tests
โ””โ”€โ”€ ๐Ÿ”ง fixtures/                    # Test fixtures and data

๐Ÿ“ฆ Scripts (scripts/)

Build and utility scripts.

scripts/
โ”œโ”€โ”€ ๐Ÿ“„ build.sh                     # Main build script
โ”œโ”€โ”€ ๐Ÿ“„ create-iso.sh                # ISO creation script
โ”œโ”€โ”€ ๐Ÿ“„ run-qemu.sh                  # QEMU execution script
โ”œโ”€โ”€ ๐Ÿ“„ setup-dev.sh                 # Development environment setup
โ”œโ”€โ”€ ๐Ÿ“„ cross-compile.sh             # Cross-compilation script
โ”œโ”€โ”€ ๐Ÿ“„ test-runner.sh               # Test execution script
โ”œโ”€โ”€ ๐Ÿ“„ deploy.sh                    # Deployment script
โ””โ”€โ”€ ๐Ÿ”ง ci/                          # CI/CD scripts
    โ”œโ”€โ”€ ๐Ÿ“„ build-matrix.sh          # Multi-architecture build
    โ”œโ”€โ”€ ๐Ÿ“„ security-scan.sh         # Security scanning
    โ””โ”€โ”€ ๐Ÿ“„ deploy-docs.sh           # Documentation deployment

๐Ÿ”ง GitHub Workflows (.github/)

GitHub Actions workflows and templates.

.github/
โ”œโ”€โ”€ ๐Ÿ”ง workflows/                   # GitHub Actions workflows
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ ci.yml                   # Main CI/CD pipeline
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ license-headers.yml      # License header checking
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ documentation.yml       # Documentation generation
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ security-scan.yml       # Security scanning
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ release.yml              # Release automation
โ”œโ”€โ”€ ๐Ÿ”ง ISSUE_TEMPLATE/              # Issue templates
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ bug_report.md            # Bug report template
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ feature_request.md       # Feature request template
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ security_report.md       # Security report template
โ”œโ”€โ”€ ๐Ÿ“„ PULL_REQUEST_TEMPLATE.md     # Pull request template
โ”œโ”€โ”€ ๐Ÿ“„ CODEOWNERS                   # Code ownership
โ””โ”€โ”€ ๐Ÿ“„ apply-license-headers.py     # License header application

๐Ÿ—๏ธ Build Artifacts (build/ and dist/)

Generated directories containing build outputs.

build/                              # Build artifacts (gitignored)
โ”œโ”€โ”€ ๐Ÿ”ง x86_64/                      # x86_64 build outputs
โ”œโ”€โ”€ ๐Ÿ”ง aarch64/                     # ARM64 build outputs
โ””โ”€โ”€ ๐Ÿ”ง riscv64/                     # RISC-V build outputs

dist/                               # Distribution files (gitignored)
โ”œโ”€โ”€ ๐Ÿ“€ sage-os-x86_64.iso          # x86_64 ISO image
โ”œโ”€โ”€ ๐Ÿ“€ sage-os-aarch64.img         # ARM64 disk image
โ””โ”€โ”€ ๐Ÿ“€ sage-os-riscv64.img         # RISC-V disk image

๐Ÿ“„ Configuration Files

Root Configuration Files

File Purpose Format
Cargo.toml Rust workspace configuration TOML
Makefile Main build system Makefile
mkdocs.yml Documentation configuration YAML
.gitignore Git ignore patterns Text
.gitattributes Git attributes Text

Build Configuration

File Purpose Architecture
bootloader/*/linker.ld Linker scripts Specific
kernel/arch/*/memory.x Memory layout Specific
scripts/qemu-*.sh QEMU configurations Specific

๐Ÿ” File Relationships

graph TD
    A[Bootloader] --> B[Kernel]
    B --> C[User Space]
    D[Tools] --> A
    D --> B
    D --> C
    E[Scripts] --> A
    E --> B
    E --> C
    F[Tests] --> B
    F --> C
    G[Docs] --> H[All Components]
    I[GitHub Workflows] --> J[CI/CD Pipeline]
    J --> A
    J --> B
    J --> C
    J --> F

๐Ÿ“Š File Statistics

Component Files Lines of Code Languages
Bootloader ~50 ~5,000 Rust, Assembly
Kernel ~200 ~25,000 Rust, Assembly
User Space ~100 ~10,000 Rust, C
Tools ~30 ~3,000 Rust, Shell
Documentation ~50 ~15,000 Markdown
Tests ~80 ~8,000 Rust
Scripts ~20 ~2,000 Shell, Python

๐ŸŽฏ Key Design Principles

  1. Modularity: Clear separation of concerns
  2. Architecture Independence: Common interfaces across platforms
  3. Security: Secure coding practices throughout
  4. Testing: Comprehensive test coverage
  5. Documentation: Extensive documentation for all components
  6. Maintainability: Clean, readable code structure

๐Ÿ“ File Naming Conventions

  • Rust files: snake_case.rs
  • Assembly files: snake_case.s or snake_case.asm
  • Documentation: kebab-case.md
  • Scripts: kebab-case.sh or snake_case.py
  • Configuration: kebab-case.yml or snake_case.toml