# misazhu/ewokos architecture

> Architecture diagram of the GitHub repository misazhu/ewokos, 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/misazhu/ewokos
- Repository: https://github.com/misazhu/ewokos

## Overview

EwokOS is a microkernel operating system whose principal runtime path is platform boot and kernel initialization, followed by launching user-space services; applications then use those services for files, devices, graphics, and networking. The graph preserves the documented filesystem, desktop, audio, and network capabilities as separate branches. Source excerpts show VFS request handling, ext3 block reads, and X rendering; other subsystem links rely on the README’s architecture description, so unsampled connections are omitted or marked unverified.

Main entry points: [`kernel/kernel/src/kernel.c`](https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/kernel.c) (Microkernel core), [`system/basic`](https://github.com/misazhu/ewokos/tree/master/system/basic) (User-space init), [`system/basic/sys/vfsd/handlers.c`](https://github.com/misazhu/ewokos/blob/master/system/basic/sys/vfsd/handlers.c) (Virtual filesystem), [`system/xwin/drivers/xserverd/xrender.c`](https://github.com/misazhu/ewokos/blob/master/system/xwin/drivers/xserverd/xrender.c) (X display compositor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Boot and kernel"]
  node_platform["Machine platform<br/>[start.c]"]
  node_loader["Boot filesystem loader<br/>[loadinit.c]"]
  node_kernel["Microkernel core<br/>[kernel.c]"]
  node_process["Processes and scheduler<br/>[proc.c]"]
  node_memory["Memory and shared memory<br/>[shm.c]"]
  node_ipc["IPC and system calls<br/>[ipc.c]"]
end

subgraph group_user["User services and storage"]
  node_init["User-space init"]
  node_libc["System C library<br/>[sys.c]"]
  node_vfs["Virtual filesystem<br/>[handlers.c]"]
  node_ext3["Ext3 filesystem reader<br/>[ext3read.c]"]
  node_session["Session service<br/>[sessiond.c]"]
  node_drivers["Device services<br/>[ttyd.c]"]
end

subgraph group_desktop["Desktop and media"]
  node_display["X display compositor<br/>[xrender.c]"]
  node_window["Window management<br/>[MisaWM.cc]"]
  node_image["PNG image support<br/>[pngrtran.c]"]
  node_audio["Audio player<br/>[AudioPlayer.cc]"]
end

subgraph group_network["Networking"]
  node_nettools["Network tools<br/>[main.c]"]
  node_websocket["WebSocket library<br/>[service.c]"]
end

node_actor(("System user or app"))
node_hardware(("Target hardware"))

node_hardware -.->|"boots on"| node_platform
node_platform -.->|"initializes"| node_kernel
node_kernel -.->|"loads filesystem"| node_loader
node_loader -.->|"launches"| node_init
node_kernel -->|"manages processes"| node_process
node_kernel -->|"manages memory"| node_memory
node_kernel -->|"provides IPC"| node_ipc
node_init -->|"starts services"| node_vfs
node_init -->|"starts services"| node_session
node_init -.->|"starts services"| node_drivers
node_actor -.->|"uses"| node_libc
node_libc -.->|"issues requests"| node_ipc
node_vfs -->|"uses filesystem"| node_ext3
node_actor -.->|"requests files"| node_vfs
node_session -.->|"starts desktop"| node_display
node_window -.->|"manages windows"| node_display
node_display -.->|"uses image support"| node_image
node_actor -.->|"plays media"| node_audio
node_audio -.->|"outputs audio"| node_drivers
node_actor -.->|"invokes tools"| node_nettools
node_actor -.->|"uses networking"| node_websocket

click node_platform "https://github.com/misazhu/ewokos/blob/master/porting.qemu/kernel/bsp/start.c"
click node_loader "https://github.com/misazhu/ewokos/blob/master/kernel/loadinit/sd/loadinit.c"
click node_kernel "https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/kernel.c"
click node_process "https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/proc.c"
click node_memory "https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/mm/shm.c"
click node_ipc "https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/ipc.c"
click node_init "https://github.com/misazhu/ewokos/tree/master/system/basic"
click node_libc "https://github.com/misazhu/ewokos/blob/master/system/basic/libc/libewoksys/ewoksys/src/sys.c"
click node_vfs "https://github.com/misazhu/ewokos/blob/master/system/basic/sys/vfsd/handlers.c"
click node_ext3 "https://github.com/misazhu/ewokos/blob/master/kernel/lib/ext3/src/ext3read.c"
click node_session "https://github.com/misazhu/ewokos/blob/master/system/basic/sbin/sessiond/sessiond.c"
click node_drivers "https://github.com/misazhu/ewokos/blob/master/porting.qemu/system/drivers/ttyd/ttyd.c"
click node_display "https://github.com/misazhu/ewokos/blob/master/system/xwin/drivers/xserverd/xrender.c"
click node_window "https://github.com/misazhu/ewokos/blob/master/system/xwin/xwm/misawm/MisaWM.cc"
click node_image "https://github.com/misazhu/ewokos/blob/master/system/gui/libs/libpng/pngrtran.c"
click node_audio "https://github.com/misazhu/ewokos/blob/master/system/xwin/apps/SndPlayer/AudioPlayer.cc"
click node_nettools "https://github.com/misazhu/ewokos/blob/master/system/network/bin/ssh/main.c"
click node_websocket "https://github.com/misazhu/ewokos/blob/master/system/network/libs/libwebsockets/src/service.c"

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_platform,node_loader,node_kernel,node_process,node_memory,node_ipc,node_actor toneBlue
class node_init,node_libc,node_vfs,node_ext3,node_session,node_drivers toneAmber
class node_display,node_window,node_image,node_audio toneMint
class node_nettools,node_websocket toneRose
class node_hardware toneIndigo
```

## Components

### Boot and kernel

- [Machine platform](https://github.com/misazhu/ewokos/blob/master/porting.qemu/kernel/bsp/start.c): `porting.qemu/kernel/bsp/start.c`
- [Boot filesystem loader](https://github.com/misazhu/ewokos/blob/master/kernel/loadinit/sd/loadinit.c): `kernel/loadinit/sd/loadinit.c`
- [Microkernel core](https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/kernel.c): `kernel/kernel/src/kernel.c`
- [Processes and scheduler](https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/proc.c): `kernel/kernel/src/proc.c`
- [Memory and shared memory](https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/mm/shm.c): `kernel/kernel/src/mm/shm.c`
- [IPC and system calls](https://github.com/misazhu/ewokos/blob/master/kernel/kernel/src/ipc.c): `kernel/kernel/src/ipc.c`

### User services and storage

- [User-space init](https://github.com/misazhu/ewokos/tree/master/system/basic): `system/basic`
- [System C library](https://github.com/misazhu/ewokos/blob/master/system/basic/libc/libewoksys/ewoksys/src/sys.c): `system/basic/libc/libewoksys/ewoksys/src/sys.c`
- [Virtual filesystem](https://github.com/misazhu/ewokos/blob/master/system/basic/sys/vfsd/handlers.c): `system/basic/sys/vfsd/handlers.c`
- [Ext3 filesystem reader](https://github.com/misazhu/ewokos/blob/master/kernel/lib/ext3/src/ext3read.c): `kernel/lib/ext3/src/ext3read.c`
- [Session service](https://github.com/misazhu/ewokos/blob/master/system/basic/sbin/sessiond/sessiond.c): `system/basic/sbin/sessiond/sessiond.c`
- [Device services](https://github.com/misazhu/ewokos/blob/master/porting.qemu/system/drivers/ttyd/ttyd.c): `porting.qemu/system/drivers/ttyd/ttyd.c`

### Desktop and media

- [X display compositor](https://github.com/misazhu/ewokos/blob/master/system/xwin/drivers/xserverd/xrender.c): `system/xwin/drivers/xserverd/xrender.c`
- [Window management](https://github.com/misazhu/ewokos/blob/master/system/xwin/xwm/misawm/MisaWM.cc): `system/xwin/xwm/misawm/MisaWM.cc`
- [PNG image support](https://github.com/misazhu/ewokos/blob/master/system/gui/libs/libpng/pngrtran.c): `system/gui/libs/libpng/pngrtran.c`
- [Audio player](https://github.com/misazhu/ewokos/blob/master/system/xwin/apps/SndPlayer/AudioPlayer.cc): `system/xwin/apps/SndPlayer/AudioPlayer.cc`

### Networking

- [Network tools](https://github.com/misazhu/ewokos/blob/master/system/network/bin/ssh/main.c): `system/network/bin/ssh/main.c`
- [WebSocket library](https://github.com/misazhu/ewokos/blob/master/system/network/libs/libwebsockets/src/service.c): `system/network/libs/libwebsockets/src/service.c`

### Other components

- **System user or app**
- **Target hardware**

## Connections

- Target hardware → Machine platform: boots on
- Machine platform → Microkernel core: initializes
- Microkernel core → Boot filesystem loader: loads filesystem
- Boot filesystem loader → User-space init: launches
- Microkernel core → Processes and scheduler: manages processes (evidence: `README.md`)
- Microkernel core → Memory and shared memory: manages memory (evidence: `README.md`)
- Microkernel core → IPC and system calls: provides IPC (evidence: `README.md`)
- User-space init → Virtual filesystem: starts services (evidence: `README.md`)
- User-space init → Session service: starts services (evidence: `README.md`)
- User-space init → Device services: starts services
- System user or app → System C library: uses
- System C library → IPC and system calls: issues requests
- Virtual filesystem → Ext3 filesystem reader: uses filesystem (evidence: `README.md`)
- System user or app → Virtual filesystem: requests files
- Session service → X display compositor: starts desktop
- Window management → X display compositor: manages windows
- X display compositor → PNG image support: uses image support
- System user or app → Audio player: plays media
- Audio player → Device services: outputs audio
- System user or app → Network tools: invokes tools
- System user or app → WebSocket library: uses networking
