# dimitrifourny/vibeos architecture

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

- Interactive diagram: https://gitdiagram.com/dimitrifourny/vibeos
- Repository: https://github.com/dimitrifourny/vibeos

## Overview

vibeOS is a Rust operating system for ARM64, with a monolithic kernel, userspace runtime and applications, and a graphical desktop. The main user journey is booting through the kernel and init into the compositor, then interacting with desktop apps or a shell; those programs use runtime services backed by kernel objects, drivers, storage and networking. The README documents these capabilities; sampled source confirms compositor-to-window-engine integration and the agent’s approval-mediated tool workflow. Some subsystem links below reflect README-level descriptions rather than inspected call sites.

Main entry points: [`kernel/src/main.rs`](https://github.com/dimitrifourny/vibeos/blob/main/kernel/src/main.rs) (Kernel core), [`libs/rt/src/handle.rs`](https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/handle.rs) (Runtime handles and syscalls), [`user/agent/src/main.rs`](https://github.com/dimitrifourny/vibeos/blob/main/user/agent/src/main.rs) (Coding agent), [`user/init/src/main.rs`](https://github.com/dimitrifourny/vibeos/blob/main/user/init/src/main.rs) (Init and service control)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot_kernel["Boot and kernel"]
  node_bootloader["UEFI loader<br/>[main.rs]"]
  node_kernel["Kernel core<br/>[main.rs]"]
  node_kernel_objects["Kernel objects and syscalls"]
  node_scheduler_memory["Scheduling and memory"]
  node_device_drivers["Device drivers"]
  node_kernel_fs["Kernel filesystem"]
end

subgraph group_runtime["Userspace runtime"]
  node_init["Init and service control<br/>[main.rs]"]
  node_runtime_api["Runtime handles and syscalls<br/>[handle.rs]"]
  node_runtime_sys["Runtime syscall layer<br/>[sys.rs]"]
  node_runtime_time["Runtime time<br/>[time.rs]"]
  node_filesystem[("Persistent filesystem<br/>[fs.rs]")]
end

subgraph group_desktop["Desktop"]
  node_compositor["Compositor host<br/>[main.rs]"]
  node_wm_engine["Window manager engine<br/>[engine.rs]"]
  node_gfx_ui["Graphics and widgets"]
end

subgraph group_apps["Applications"]
  node_desktop_apps["Desktop applications<br/>[app.rs]"]
  node_terminal_shell["Terminal and shell<br/>[main.rs]"]
  node_agent["Coding agent<br/>[main.rs]"]
  node_agent_tools["Agent tools and approval<br/>[tools.rs]"]
end

subgraph group_network["Network and security"]
  node_network_stack["IPv4 network stack<br/>[stack.rs]"]
  node_tls_crypto["TLS and cryptography<br/>[client.rs]"]
  node_ssh_server["SSH server<br/>[main.rs]"]
end

node_user(("Computer user"))
node_external_model(("Model API"))

node_user -.->|"starts system"| node_bootloader
node_bootloader -->|"loads kernel"| node_kernel
node_user -.->|"boots directly"| node_kernel
node_kernel -.->|"provides objects"| node_kernel_objects
node_kernel -.->|"schedules and maps"| node_scheduler_memory
node_kernel -.->|"drives hardware"| node_device_drivers
node_kernel -.->|"serves filesystem"| node_kernel_fs
node_kernel -.->|"starts userspace"| node_init
node_init -.->|"starts desktop"| node_compositor
node_init -.->|"starts and restarts"| node_ssh_server
node_runtime_api -->|"invokes"| node_runtime_sys
node_runtime_time -->|"reads clock"| node_runtime_sys
node_compositor -->|"feeds events and time"| node_wm_engine
node_compositor -.->|"renders desktop"| node_gfx_ui
node_wm_engine -.->|"draws windows"| node_gfx_ui
node_user -.->|"uses desktop apps"| node_desktop_apps
node_user -.->|"runs commands"| node_terminal_shell
node_agent -->|"requests approved actions"| node_agent_tools
node_agent_tools -.->|"reads and edits files"| node_filesystem
node_agent_tools -.->|"runs shell commands"| node_terminal_shell
node_agent -.->|"sends HTTPS requests"| node_external_model
node_agent -.->|"uses HTTPS"| node_tls_crypto
node_tls_crypto -.->|"transports network traffic"| node_network_stack
node_ssh_server -.->|"serves SSH connections"| node_network_stack
node_runtime_api -.->|"accesses kernel handles"| node_kernel_objects
node_runtime_api -.->|"accesses files"| node_filesystem

click node_bootloader "https://github.com/dimitrifourny/vibeos/blob/main/boot/efi/src/main.rs"
click node_kernel "https://github.com/dimitrifourny/vibeos/blob/main/kernel/src/main.rs"
click node_kernel_objects "https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/object"
click node_scheduler_memory "https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/sched"
click node_device_drivers "https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/drivers"
click node_kernel_fs "https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/fs"
click node_init "https://github.com/dimitrifourny/vibeos/blob/main/user/init/src/main.rs"
click node_runtime_api "https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/handle.rs"
click node_runtime_sys "https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/sys.rs"
click node_runtime_time "https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/time.rs"
click node_compositor "https://github.com/dimitrifourny/vibeos/blob/main/user/compositor/src/main.rs"
click node_wm_engine "https://github.com/dimitrifourny/vibeos/blob/main/libs/wm/src/engine.rs"
click node_gfx_ui "https://github.com/dimitrifourny/vibeos/tree/main/libs/ui/src"
click node_desktop_apps "https://github.com/dimitrifourny/vibeos/blob/main/user/files/src/app.rs"
click node_terminal_shell "https://github.com/dimitrifourny/vibeos/blob/main/user/terminal/src/main.rs"
click node_agent "https://github.com/dimitrifourny/vibeos/blob/main/user/agent/src/main.rs"
click node_agent_tools "https://github.com/dimitrifourny/vibeos/blob/main/user/agent/src/tools.rs"
click node_network_stack "https://github.com/dimitrifourny/vibeos/blob/main/libs/net/src/stack.rs"
click node_tls_crypto "https://github.com/dimitrifourny/vibeos/blob/main/libs/tls/src/client.rs"
click node_ssh_server "https://github.com/dimitrifourny/vibeos/blob/main/user/sshd/src/main.rs"
click node_filesystem "https://github.com/dimitrifourny/vibeos/blob/main/libs/fs/src/fs.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_bootloader,node_kernel,node_kernel_objects,node_scheduler_memory,node_device_drivers,node_kernel_fs,node_user toneBlue
class node_init,node_runtime_api,node_runtime_sys,node_runtime_time,node_filesystem toneAmber
class node_compositor,node_wm_engine,node_gfx_ui,node_external_model toneMint
class node_desktop_apps,node_terminal_shell,node_agent,node_agent_tools toneRose
class node_network_stack,node_tls_crypto,node_ssh_server toneIndigo
```

## Components

### Boot and kernel

- [UEFI loader](https://github.com/dimitrifourny/vibeos/blob/main/boot/efi/src/main.rs): `boot/efi/src/main.rs`
- [Kernel core](https://github.com/dimitrifourny/vibeos/blob/main/kernel/src/main.rs): `kernel/src/main.rs`
- [Kernel objects and syscalls](https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/object): `kernel/src/object`
- [Scheduling and memory](https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/sched): `kernel/src/sched`
- [Device drivers](https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/drivers): `kernel/src/drivers`
- [Kernel filesystem](https://github.com/dimitrifourny/vibeos/tree/main/kernel/src/fs): `kernel/src/fs`

### Userspace runtime

- [Init and service control](https://github.com/dimitrifourny/vibeos/blob/main/user/init/src/main.rs): `user/init/src/main.rs`
- [Runtime handles and syscalls](https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/handle.rs): `libs/rt/src/handle.rs`
- [Runtime syscall layer](https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/sys.rs): `libs/rt/src/sys.rs`
- [Runtime time](https://github.com/dimitrifourny/vibeos/blob/main/libs/rt/src/time.rs): `libs/rt/src/time.rs`
- [Persistent filesystem](https://github.com/dimitrifourny/vibeos/blob/main/libs/fs/src/fs.rs): `libs/fs/src/fs.rs`

### Desktop

- [Compositor host](https://github.com/dimitrifourny/vibeos/blob/main/user/compositor/src/main.rs): `user/compositor/src/main.rs`
- [Window manager engine](https://github.com/dimitrifourny/vibeos/blob/main/libs/wm/src/engine.rs): `libs/wm/src/engine.rs`
- [Graphics and widgets](https://github.com/dimitrifourny/vibeos/tree/main/libs/ui/src): `libs/ui/src`

### Applications

- [Desktop applications](https://github.com/dimitrifourny/vibeos/blob/main/user/files/src/app.rs): `user/files/src/app.rs`
- [Terminal and shell](https://github.com/dimitrifourny/vibeos/blob/main/user/terminal/src/main.rs): `user/terminal/src/main.rs`
- [Coding agent](https://github.com/dimitrifourny/vibeos/blob/main/user/agent/src/main.rs): `user/agent/src/main.rs`
- [Agent tools and approval](https://github.com/dimitrifourny/vibeos/blob/main/user/agent/src/tools.rs): `user/agent/src/tools.rs`

### Network and security

- [IPv4 network stack](https://github.com/dimitrifourny/vibeos/blob/main/libs/net/src/stack.rs): `libs/net/src/stack.rs`
- [TLS and cryptography](https://github.com/dimitrifourny/vibeos/blob/main/libs/tls/src/client.rs): `libs/tls/src/client.rs`
- [SSH server](https://github.com/dimitrifourny/vibeos/blob/main/user/sshd/src/main.rs): `user/sshd/src/main.rs`

### Other components

- **Computer user**
- **Model API**

## Connections

- Computer user → UEFI loader: starts system (evidence: `README.md`)
- UEFI loader → Kernel core: loads kernel (evidence: `README.md`)
- Computer user → Kernel core: boots directly (evidence: `README.md`)
- Kernel core → Kernel objects and syscalls: provides objects (evidence: `README.md`)
- Kernel core → Scheduling and memory: schedules and maps (evidence: `README.md`)
- Kernel core → Device drivers: drives hardware (evidence: `README.md`)
- Kernel core → Kernel filesystem: serves filesystem (evidence: `README.md`)
- Kernel core → Init and service control: starts userspace (evidence: `README.md`)
- Init and service control → Compositor host: starts desktop (evidence: `README.md`)
- Init and service control → SSH server: starts and restarts
- Runtime handles and syscalls → Runtime syscall layer: invokes (evidence: `libs/rt/src/handle.rs`)
- Runtime time → Runtime syscall layer: reads clock (evidence: `libs/rt/src/time.rs`)
- Compositor host → Window manager engine: feeds events and time (evidence: `user/compositor/src/main.rs`)
- Compositor host → Graphics and widgets: renders desktop (evidence: `README.md`)
- Window manager engine → Graphics and widgets: draws windows (evidence: `README.md`)
- Computer user → Desktop applications: uses desktop apps (evidence: `README.md`)
- Computer user → Terminal and shell: runs commands (evidence: `README.md`)
- Coding agent → Agent tools and approval: requests approved actions (evidence: `user/agent/src/main.rs`)
- Agent tools and approval → Persistent filesystem: reads and edits files (evidence: `README.md`)
- Agent tools and approval → Terminal and shell: runs shell commands (evidence: `README.md`)
- Coding agent → Model API: sends HTTPS requests (evidence: `README.md`)
- Coding agent → TLS and cryptography: uses HTTPS (evidence: `README.md`)
- TLS and cryptography → IPv4 network stack: transports network traffic (evidence: `README.md`)
- SSH server → IPv4 network stack: serves SSH connections (evidence: `README.md`)
- Runtime handles and syscalls → Kernel objects and syscalls: accesses kernel handles (evidence: `README.md`)
- Runtime handles and syscalls → Persistent filesystem: accesses files (evidence: `README.md`)
