# tombl/linux architecture

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

- Interactive diagram: https://gitdiagram.com/tombl/linux
- Repository: https://github.com/tombl/linux

## Overview

This repository presents a Linux WebAssembly port intended to run in a browser. Its documented user-to-result path is browser launch into a WebAssembly kernel, with userspace execution and syscall dispatch; the README also describes ELF/linker support, JavaScript-worker kernel threads, and host-provided virtio block I/O. The supplied tree and excerpts do not include the port’s implementation files, so those components have null paths and relationships are limited to README statements. Planned features are excluded.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Kernel execution"]
  node_wasm_kernel["WebAssembly kernel"]
  node_elf_linker["ELF and linker"]
  node_binfmt["WASM binfmt"]
  node_syscalls["Syscall dispatch"]
  node_kernel_threads["Kernel threads"]
end

subgraph group_userspace["Userspace"]
  node_musl["musl userspace"]
  node_busybox["BusyBox tools"]
end

subgraph group_host["Browser host"]
  node_js_workers["JavaScript workers"]
  node_host_library["Host library"]
end

subgraph group_devices["Virtual devices"]
  node_virtio["Virtio support"]
  node_block_device[("Block device")]
end

node_browser_user(("Browser user"))

node_browser_user -.->|"launches"| node_wasm_kernel
node_wasm_kernel -.->|"uses"| node_elf_linker
node_wasm_kernel -.->|"supports"| node_binfmt
node_wasm_kernel -.->|"exposes"| node_syscalls
node_wasm_kernel -.->|"provides"| node_kernel_threads
node_kernel_threads -->|"maps to"| node_js_workers
node_wasm_kernel -.->|"runs"| node_musl
node_wasm_kernel -.->|"runs"| node_busybox
node_host_library -->|"implements"| node_virtio
node_virtio -->|"provides"| node_block_device

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_wasm_kernel,node_elf_linker,node_binfmt,node_syscalls,node_kernel_threads,node_browser_user toneBlue
class node_musl,node_busybox toneAmber
class node_js_workers,node_host_library toneMint
class node_virtio,node_block_device toneRose
```

## Components

### Kernel execution

- **WebAssembly kernel**
- **ELF and linker**
- **WASM binfmt**
- **Syscall dispatch**
- **Kernel threads**

### Userspace

- **musl userspace**
- **BusyBox tools**

### Browser host

- **JavaScript workers**
- **Host library**

### Virtual devices

- **Virtio support**
- **Block device**

### Other components

- **Browser user**

## Connections

- Browser user → WebAssembly kernel: launches (evidence: `README`)
- WebAssembly kernel → ELF and linker: uses (evidence: `README`)
- WebAssembly kernel → WASM binfmt: supports (evidence: `README`)
- WebAssembly kernel → Syscall dispatch: exposes (evidence: `README`)
- WebAssembly kernel → Kernel threads: provides (evidence: `README`)
- Kernel threads → JavaScript workers: maps to (evidence: `README`)
- WebAssembly kernel → musl userspace: runs (evidence: `README`)
- WebAssembly kernel → BusyBox tools: runs (evidence: `README`)
- Host library → Virtio support: implements (evidence: `README`)
- Virtio support → Block device: provides (evidence: `README`)
