# syfe-bit/myos architecture

> Architecture diagram of the GitHub repository syfe-bit/myos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syfe-bit/myos
- Repository: https://github.com/syfe-bit/myos

## Overview

This is an early x86_64 operating-system kernel: its visible runtime initializes VGA text output, prints a greeting, loads an IDT, and triggers a breakpoint whose handler reports the exception. The tree also shows GRUB configuration and x86 boot/long-mode assembly, but those files were not sampled, so their handoffs are shown as unverified. The GDT implementation is present but the sampled kernel entry does not call it. The README identifies QEMU as the intended way to launch the project; details of the launch wiring are not shown.

Main entry points: [`kernel_rust/src/lib.rs`](https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/lib.rs) (Rust kernel entry), [`src/arch/x86_64/grub.cfg`](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/grub.cfg) (GRUB configuration), [`src/arch/x86_64/multiboot.asm`](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/multiboot.asm) (Multiboot entry), [`src/arch/x86_64/boot.asm`](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/boot.asm) (Boot entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot"]
  node_grub["GRUB configuration<br/>[grub.cfg]"]
  node_multiboot["Multiboot entry<br/>[multiboot.asm]"]
  node_boot_entry["Boot entry<br/>[boot.asm]"]
  node_long_mode["Long-mode setup<br/>[long_mode.asm]"]
  node_kernel_image["Kernel image<br/>[kernel.bin]"]
end

subgraph group_kernel["Kernel"]
  node_rust_entry["Rust kernel entry<br/>[lib.rs]"]
  node_gdt["GDT setup<br/>[gdt.rs]"]
end

subgraph group_diagnostics["Exceptions and output"]
  node_idt["IDT setup and handlers<br/>[interrupts.rs]"]
  node_vga["VGA text output<br/>[vga_buffer.rs]"]
end

node_qemu(("QEMU"))

node_qemu -.->|"launches"| node_grub
node_grub -.->|"loads"| node_multiboot
node_multiboot -.->|"enters"| node_boot_entry
node_boot_entry -.->|"sets up"| node_long_mode
node_long_mode -.->|"transfers control"| node_kernel_image
node_kernel_image -.->|"enters"| node_rust_entry
node_rust_entry -->|"clears and prints"| node_vga
node_rust_entry -->|"initializes and triggers"| node_idt
node_idt -->|"reports exceptions"| node_vga
node_rust_entry -.-> node_gdt

click node_grub "https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/grub.cfg"
click node_multiboot "https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/multiboot.asm"
click node_boot_entry "https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/boot.asm"
click node_long_mode "https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/long_mode.asm"
click node_kernel_image "https://github.com/syfe-bit/myos/blob/main/dossier_build_iso/boot/kernel.bin"
click node_rust_entry "https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/lib.rs"
click node_gdt "https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/gdt.rs"
click node_idt "https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/interrupts.rs"
click node_vga "https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/vga_buffer.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_grub,node_multiboot,node_boot_entry,node_long_mode,node_kernel_image toneBlue
class node_rust_entry,node_gdt toneAmber
class node_idt,node_vga toneMint
class node_qemu toneIndigo
```

## Components

### Boot

- [GRUB configuration](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/grub.cfg): `src/arch/x86_64/grub.cfg`
- [Multiboot entry](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/multiboot.asm): `src/arch/x86_64/multiboot.asm`
- [Boot entry](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/boot.asm): `src/arch/x86_64/boot.asm`
- [Long-mode setup](https://github.com/syfe-bit/myos/blob/main/src/arch/x86_64/long_mode.asm): `src/arch/x86_64/long_mode.asm`
- [Kernel image](https://github.com/syfe-bit/myos/blob/main/dossier_build_iso/boot/kernel.bin): `dossier_build_iso/boot/kernel.bin`

### Kernel

- [Rust kernel entry](https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/lib.rs): `kernel_rust/src/lib.rs`
- [GDT setup](https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/gdt.rs): `kernel_rust/src/gdt.rs`

### Exceptions and output

- [IDT setup and handlers](https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/interrupts.rs): `kernel_rust/src/interrupts.rs`
- [VGA text output](https://github.com/syfe-bit/myos/blob/main/kernel_rust/src/vga_buffer.rs): `kernel_rust/src/vga_buffer.rs`

### Other components

- **QEMU**

## Connections

- QEMU → GRUB configuration: launches (evidence: `README.md`)
- GRUB configuration → Multiboot entry: loads
- Multiboot entry → Boot entry: enters
- Boot entry → Long-mode setup: sets up
- Long-mode setup → Kernel image: transfers control
- Kernel image → Rust kernel entry: enters
- Rust kernel entry → VGA text output: clears and prints (evidence: `kernel_rust/src/lib.rs`)
- Rust kernel entry → IDT setup and handlers: initializes and triggers (evidence: `kernel_rust/src/lib.rs`)
- IDT setup and handlers → VGA text output: reports exceptions (evidence: `kernel_rust/src/interrupts.rs`)
- Rust kernel entry → GDT setup (evidence: `kernel_rust/src/lib.rs`)
