# sdgoij/minixrs architecture

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

- Interactive diagram: https://gitdiagram.com/sdgoij/minixrs
- Repository: https://github.com/sdgoij/minixrs

## Overview

minixrs is a Rust implementation of the MINIX 3 operating-system stack, bootable on x86_64, RISC-V64, AArch64, and wasm32. A representative user workflow starts at the shell, enters the kernel through system calls, reaches VFS, and is served by MFS and storage. The repository also includes process and memory servers, device drivers, networking, graphics/Wayland, a C library and dynamic loader, and boot-image support. The README documents these capabilities; some subsystem connections below are documented at a high level because their source was not sampled.

Main entry points: [`crates/kernel/src/ipc.rs`](https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/ipc.rs) (IPC and grants), [`crates/servers/src/vfs/main.rs`](https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/vfs/main.rs) (VFS server), [`crates/kernel/src/system.rs`](https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/system.rs) (Kernel core), [`crates/userland/src/shell.rs`](https://github.com/sdgoij/minixrs/blob/main/crates/userland/src/shell.rs) (Shell and commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_user["Userland"]
  node_user["Shell and commands<br/>[shell.rs]"]
  node_libc["C library<br/>[lib.rs]"]
  node_runtime["Runtime and std<br/>[lib.rs]"]
  node_ldso["Dynamic loader<br/>[rtld.rs]"]
end

subgraph group_kernel["Kernel"]
  node_syscall["System calls<br/>[syscall.rs]"]
  node_ipc["IPC and grants<br/>[ipc.rs]"]
  node_kernelcore["Kernel core<br/>[system.rs]"]
  node_arch["Architecture HAL<br/>[hal.rs]"]
end

subgraph group_servers["System servers"]
  node_pm["Process manager<br/>[pm.rs]"]
  node_sched["Scheduler server<br/>[sched.rs]"]
  node_vm["VM server<br/>[mod.rs]"]
  node_vfs["VFS server<br/>[main.rs]"]
end

subgraph group_io["Filesystems and I/O"]
  node_mfs["MFS server<br/>[main.rs]"]
  node_ext2["Ext2 server<br/>[main.rs]"]
  node_otherfs["Other filesystems<br/>[main.rs]"]
  node_drivers["Device drivers<br/>[lib.rs]"]
  node_net["Networking<br/>[lib.rs]"]
end

subgraph group_platform["Platform and graphics"]
  node_boot["Boot images<br/>[lib.rs]"]
  node_wayland["Wayland protocol<br/>[server.rs]"]
  node_video["Display drivers<br/>[mod.rs]"]
end

node_useractor(("User"))

node_useractor -->|"runs commands"| node_user
node_user -->|"invokes services"| node_syscall
node_libc -.->|"uses syscalls"| node_syscall
node_runtime -.->|"uses runtime"| node_libc
node_ldso -.->|"loads programs"| node_runtime
node_syscall -.->|"enters kernel"| node_kernelcore
node_kernelcore -.->|"provides IPC"| node_ipc
node_kernelcore -.->|"uses HAL"| node_arch
node_ipc -.->|"routes requests"| node_vfs
node_ipc -.->|"routes requests"| node_pm
node_ipc -.->|"routes requests"| node_sched
node_ipc -.->|"routes requests"| node_vm
node_vfs -->|"forwards filesystem requests"| node_mfs
node_vfs -.->|"dispatches filesystem requests"| node_ext2
node_vfs -.->|"dispatches filesystem requests"| node_otherfs
node_vfs -.->|"routes device requests"| node_drivers
node_drivers -.->|"supports network devices"| node_net
node_boot -.->|"boots system"| node_kernelcore
node_user -.->|"uses graphics protocol"| node_wayland
node_wayland -.->|"presents display"| node_video

click node_user "https://github.com/sdgoij/minixrs/blob/main/crates/userland/src/shell.rs"
click node_libc "https://github.com/sdgoij/minixrs/blob/main/crates/minix-libc/src/lib.rs"
click node_runtime "https://github.com/sdgoij/minixrs/blob/main/crates/minix-rt/src/lib.rs"
click node_ldso "https://github.com/sdgoij/minixrs/blob/main/crates/ldso/src/rtld.rs"
click node_syscall "https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/syscall.rs"
click node_ipc "https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/ipc.rs"
click node_kernelcore "https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/system.rs"
click node_arch "https://github.com/sdgoij/minixrs/blob/main/crates/arch-x86_64/src/hal.rs"
click node_pm "https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/pm.rs"
click node_sched "https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/sched.rs"
click node_vm "https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/vm/mod.rs"
click node_vfs "https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/vfs/main.rs"
click node_mfs "https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/mfs/main.rs"
click node_ext2 "https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/ext2/main.rs"
click node_otherfs "https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/iso9660/main.rs"
click node_drivers "https://github.com/sdgoij/minixrs/blob/main/crates/drivers/src/lib.rs"
click node_net "https://github.com/sdgoij/minixrs/blob/main/crates/net/src/lib.rs"
click node_boot "https://github.com/sdgoij/minixrs/blob/main/crates/boot-image/src/lib.rs"
click node_wayland "https://github.com/sdgoij/minixrs/blob/main/crates/wayland/src/server.rs"
click node_video "https://github.com/sdgoij/minixrs/blob/main/crates/drivers/src/video/mod.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_user,node_libc,node_runtime,node_ldso,node_useractor toneBlue
class node_syscall,node_ipc,node_kernelcore,node_arch toneAmber
class node_pm,node_sched,node_vm,node_vfs toneMint
class node_mfs,node_ext2,node_otherfs,node_drivers,node_net toneRose
class node_boot,node_wayland,node_video toneIndigo
```

## Components

### Userland

- [Shell and commands](https://github.com/sdgoij/minixrs/blob/main/crates/userland/src/shell.rs): `crates/userland/src/shell.rs`
- [C library](https://github.com/sdgoij/minixrs/blob/main/crates/minix-libc/src/lib.rs): `crates/minix-libc/src/lib.rs`
- [Runtime and std](https://github.com/sdgoij/minixrs/blob/main/crates/minix-rt/src/lib.rs): `crates/minix-rt/src/lib.rs`
- [Dynamic loader](https://github.com/sdgoij/minixrs/blob/main/crates/ldso/src/rtld.rs): `crates/ldso/src/rtld.rs`

### Kernel

- [System calls](https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/syscall.rs): `crates/kernel/src/syscall.rs`
- [IPC and grants](https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/ipc.rs): `crates/kernel/src/ipc.rs`
- [Kernel core](https://github.com/sdgoij/minixrs/blob/main/crates/kernel/src/system.rs): `crates/kernel/src/system.rs`
- [Architecture HAL](https://github.com/sdgoij/minixrs/blob/main/crates/arch-x86_64/src/hal.rs): `crates/arch-x86_64/src/hal.rs`

### System servers

- [Process manager](https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/pm.rs): `crates/servers/src/pm.rs`
- [Scheduler server](https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/sched.rs): `crates/servers/src/sched.rs`
- [VM server](https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/vm/mod.rs): `crates/servers/src/vm/mod.rs`
- [VFS server](https://github.com/sdgoij/minixrs/blob/main/crates/servers/src/vfs/main.rs): `crates/servers/src/vfs/main.rs`

### Filesystems and I/O

- [MFS server](https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/mfs/main.rs): `crates/fs/src/mfs/main.rs`
- [Ext2 server](https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/ext2/main.rs): `crates/fs/src/ext2/main.rs`
- [Other filesystems](https://github.com/sdgoij/minixrs/blob/main/crates/fs/src/iso9660/main.rs): `crates/fs/src/iso9660/main.rs`
- [Device drivers](https://github.com/sdgoij/minixrs/blob/main/crates/drivers/src/lib.rs): `crates/drivers/src/lib.rs`
- [Networking](https://github.com/sdgoij/minixrs/blob/main/crates/net/src/lib.rs): `crates/net/src/lib.rs`

### Platform and graphics

- [Boot images](https://github.com/sdgoij/minixrs/blob/main/crates/boot-image/src/lib.rs): `crates/boot-image/src/lib.rs`
- [Wayland protocol](https://github.com/sdgoij/minixrs/blob/main/crates/wayland/src/server.rs): `crates/wayland/src/server.rs`
- [Display drivers](https://github.com/sdgoij/minixrs/blob/main/crates/drivers/src/video/mod.rs): `crates/drivers/src/video/mod.rs`

### Other components

- **User**

## Connections

- User → Shell and commands: runs commands
- Shell and commands → System calls: invokes services
- C library → System calls: uses syscalls
- Runtime and std → C library: uses runtime
- Dynamic loader → Runtime and std: loads programs
- System calls → Kernel core: enters kernel (evidence: `crates/kernel/src/system.rs`)
- Kernel core → IPC and grants: provides IPC (evidence: `crates/kernel/src/system.rs`)
- Kernel core → Architecture HAL: uses HAL
- IPC and grants → VFS server: routes requests
- IPC and grants → Process manager: routes requests
- IPC and grants → Scheduler server: routes requests
- IPC and grants → VM server: routes requests
- VFS server → MFS server: forwards filesystem requests
- VFS server → Ext2 server: dispatches filesystem requests
- VFS server → Other filesystems: dispatches filesystem requests
- VFS server → Device drivers: routes device requests
- Device drivers → Networking: supports network devices
- Boot images → Kernel core: boots system
- Shell and commands → Wayland protocol: uses graphics protocol
- Wayland protocol → Display drivers: presents display
