# asmodeus14/nyx architecture

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

- Interactive diagram: https://gitdiagram.com/asmodeus14/nyx
- Repository: https://github.com/asmodeus14/nyx

## Overview

Nyx is a pre-alpha Rust operating system for laptops and QEMU. Its main user path is booting into the Meridian desktop, interacting with its apps, and relying on kernel services and hardware drivers; quantum work can be compiled, simulated locally, or sent to cloud QPUs. The graph preserves the documented kernel, graphics, networking, desktop, and quantum capabilities. Source excerpts establish some internal calls, while several broader subsystem links are documented by the README; unsampled implementation details are not inferred.

Main entry points: [`nyx-kernel/src/main.rs`](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/main.rs) (Nyx kernel), [`libs/gui/src/app.rs`](https://github.com/asmodeus14/nyx/blob/master/libs/gui/src/app.rs) (App GUI runtime), [`tools/compiler/src/parser.rs`](https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/parser.rs) (QCLang compiler), [`libs/meridian/src/layout.rs`](https://github.com/asmodeus14/nyx/blob/master/libs/meridian/src/layout.rs) (Meridian desktop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kernel["Kernel and hardware"]
  node_kernel["Nyx kernel<br/>[main.rs]"]
  node_memory["Memory manager<br/>[memory.rs]"]
  node_acpi["ACPI platform"]
  node_drivers["Device drivers"]
  node_storage["VFS and storage<br/>[vfs.rs]"]
end

subgraph group_desktop["Desktop and apps"]
  node_meridian["Meridian desktop<br/>[layout.rs]"]
  node_gui["App GUI runtime<br/>[app.rs]"]
  node_shell["Command launcher<br/>[main.rs]"]
  node_explorer["Files app<br/>[main.rs]"]
  node_terminal["Terminal<br/>[main.rs]"]
  node_settings["Settings app<br/>[main.rs]"]
  node_sysmon["System Monitor<br/>[main.rs]"]
end

subgraph group_graphics["Graphics stack"]
  node_gpu["Intel GPU stack<br/>[engine.rs]"]
  node_compositor["Desktop compositor<br/>[gui.rs]"]
end

subgraph group_network["Networking"]
  node_wifi["Wi-Fi and Ethernet"]
  node_netstack["TCP, DNS, HTTPS<br/>[http.rs]"]
end

subgraph group_quantum["Quantum computing"]
  node_qcstudio["QCLang Studio<br/>[main.rs]"]
  node_compiler["QCLang compiler<br/>[parser.rs]"]
  node_qir["Quantum IR<br/>[mod.rs]"]
  node_circuit["Circuit flattening<br/>[program.rs]"]
  node_simulator["Local simulator<br/>[statevector.rs]"]
  node_qruntime["Quantum runtime<br/>[lib.rs]"]
  node_providers["IBM and IonQ<br/>[ibm.rs]"]
end

node_user(("Laptop user"))
node_cloud{{"Quantum cloud QPUs"}}

node_user -->|"boots"| node_kernel
node_user -->|"uses desktop"| node_meridian
node_meridian -.->|"hosts apps"| node_gui
node_gui -->|"sends window updates"| node_compositor
node_compositor -.->|"renders desktop"| node_gpu
node_kernel -.->|"manages memory"| node_memory
node_kernel -.->|"uses ACPI"| node_acpi
node_kernel -->|"provides hardware access"| node_drivers
node_kernel -->|"provides storage"| node_storage
node_kernel -->|"drives Intel GPU"| node_gpu
node_shell -.->|"uses GUI runtime"| node_gui
node_explorer -.->|"uses GUI runtime"| node_gui
node_settings -.->|"uses GUI runtime"| node_gui
node_sysmon -.->|"uses GUI runtime"| node_gui
node_kernel -->|"provides network drivers"| node_wifi
node_wifi -->|"carries network traffic"| node_netstack
node_terminal -->|"makes HTTPS requests"| node_netstack
node_user -->|"creates quantum programs"| node_qcstudio
node_qcstudio -.->|"compiles QCLang"| node_compiler
node_compiler -->|"builds QIR"| node_qir
node_qir -->|"flattens operations"| node_circuit
node_circuit -->|"simulates locally"| node_simulator
node_compiler -.->|"adapts compiled jobs"| node_qruntime
node_qruntime -.->|"selects provider"| node_providers
node_providers -->|"submits jobs"| node_cloud

click node_kernel "https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/main.rs"
click node_memory "https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/memory.rs"
click node_acpi "https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/acpica-core"
click node_drivers "https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/src/drivers"
click node_storage "https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/vfs.rs"
click node_meridian "https://github.com/asmodeus14/nyx/blob/master/libs/meridian/src/layout.rs"
click node_gui "https://github.com/asmodeus14/nyx/blob/master/libs/gui/src/app.rs"
click node_shell "https://github.com/asmodeus14/nyx/blob/master/apps/shell/src/main.rs"
click node_explorer "https://github.com/asmodeus14/nyx/blob/master/apps/explorer/src/main.rs"
click node_terminal "https://github.com/asmodeus14/nyx/blob/master/apps/terminal/src/main.rs"
click node_settings "https://github.com/asmodeus14/nyx/blob/master/apps/settings/src/main.rs"
click node_sysmon "https://github.com/asmodeus14/nyx/blob/master/apps/sysmon/src/main.rs"
click node_gpu "https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/drivers/gpu/intel/render/engine.rs"
click node_compositor "https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/gui.rs"
click node_wifi "https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/src/drivers/net"
click node_netstack "https://github.com/asmodeus14/nyx/blob/master/libs/net/src/http.rs"
click node_qcstudio "https://github.com/asmodeus14/nyx/blob/master/apps/qcstudio/src/main.rs"
click node_compiler "https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/parser.rs"
click node_qir "https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/qir/mod.rs"
click node_circuit "https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/program.rs"
click node_simulator "https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/statevector.rs"
click node_qruntime "https://github.com/asmodeus14/nyx/blob/master/libs/quantum-rt/src/lib.rs"
click node_providers "https://github.com/asmodeus14/nyx/blob/master/libs/quantum-rt/src/ibm.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_kernel,node_memory,node_acpi,node_drivers,node_storage,node_user toneBlue
class node_meridian,node_gui,node_shell,node_explorer,node_terminal,node_settings,node_sysmon toneAmber
class node_gpu,node_compositor toneMint
class node_wifi,node_netstack toneRose
class node_qcstudio,node_compiler,node_qir,node_circuit,node_simulator,node_qruntime,node_providers,node_cloud toneIndigo
```

## Components

### Kernel and hardware

- [Nyx kernel](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/main.rs): `nyx-kernel/src/main.rs`
- [Memory manager](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/memory.rs): `nyx-kernel/src/memory.rs`
- [ACPI platform](https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/acpica-core): `nyx-kernel/acpica-core`
- [Device drivers](https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/src/drivers): `nyx-kernel/src/drivers`
- [VFS and storage](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/vfs.rs): `nyx-kernel/src/vfs.rs`

### Desktop and apps

- [Meridian desktop](https://github.com/asmodeus14/nyx/blob/master/libs/meridian/src/layout.rs): `libs/meridian/src/layout.rs`
- [App GUI runtime](https://github.com/asmodeus14/nyx/blob/master/libs/gui/src/app.rs): `libs/gui/src/app.rs`
- [Command launcher](https://github.com/asmodeus14/nyx/blob/master/apps/shell/src/main.rs): `apps/shell/src/main.rs`
- [Files app](https://github.com/asmodeus14/nyx/blob/master/apps/explorer/src/main.rs): `apps/explorer/src/main.rs`
- [Terminal](https://github.com/asmodeus14/nyx/blob/master/apps/terminal/src/main.rs): `apps/terminal/src/main.rs`
- [Settings app](https://github.com/asmodeus14/nyx/blob/master/apps/settings/src/main.rs): `apps/settings/src/main.rs`
- [System Monitor](https://github.com/asmodeus14/nyx/blob/master/apps/sysmon/src/main.rs): `apps/sysmon/src/main.rs`

### Graphics stack

- [Intel GPU stack](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/drivers/gpu/intel/render/engine.rs): `nyx-kernel/src/drivers/gpu/intel/render/engine.rs`
- [Desktop compositor](https://github.com/asmodeus14/nyx/blob/master/nyx-kernel/src/gui.rs): `nyx-kernel/src/gui.rs`

### Networking

- [Wi-Fi and Ethernet](https://github.com/asmodeus14/nyx/tree/master/nyx-kernel/src/drivers/net): `nyx-kernel/src/drivers/net`
- [TCP, DNS, HTTPS](https://github.com/asmodeus14/nyx/blob/master/libs/net/src/http.rs): `libs/net/src/http.rs`

### Quantum computing

- [QCLang Studio](https://github.com/asmodeus14/nyx/blob/master/apps/qcstudio/src/main.rs): `apps/qcstudio/src/main.rs`
- [QCLang compiler](https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/parser.rs): `tools/compiler/src/parser.rs`
- [Quantum IR](https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/qir/mod.rs): `tools/compiler/src/qir/mod.rs`
- [Circuit flattening](https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/program.rs): `tools/compiler/src/program.rs`
- [Local simulator](https://github.com/asmodeus14/nyx/blob/master/tools/compiler/src/statevector.rs): `tools/compiler/src/statevector.rs`
- [Quantum runtime](https://github.com/asmodeus14/nyx/blob/master/libs/quantum-rt/src/lib.rs): `libs/quantum-rt/src/lib.rs`
- [IBM and IonQ](https://github.com/asmodeus14/nyx/blob/master/libs/quantum-rt/src/ibm.rs): `libs/quantum-rt/src/ibm.rs`

### Other components

- **Laptop user**
- **Quantum cloud QPUs**

## Connections

- Laptop user → Nyx kernel: boots (evidence: `README.md`)
- Laptop user → Meridian desktop: uses desktop (evidence: `README.md`)
- Meridian desktop → App GUI runtime: hosts apps
- App GUI runtime → Desktop compositor: sends window updates (evidence: `libs/gui/src/app.rs`)
- Desktop compositor → Intel GPU stack: renders desktop
- Nyx kernel → Memory manager: manages memory
- Nyx kernel → ACPI platform: uses ACPI
- Nyx kernel → Device drivers: provides hardware access (evidence: `README.md`)
- Nyx kernel → VFS and storage: provides storage (evidence: `README.md`)
- Nyx kernel → Intel GPU stack: drives Intel GPU (evidence: `README.md`)
- Command launcher → App GUI runtime: uses GUI runtime
- Files app → App GUI runtime: uses GUI runtime
- Settings app → App GUI runtime: uses GUI runtime
- System Monitor → App GUI runtime: uses GUI runtime
- Nyx kernel → Wi-Fi and Ethernet: provides network drivers (evidence: `README.md`)
- Wi-Fi and Ethernet → TCP, DNS, HTTPS: carries network traffic (evidence: `README.md`)
- Terminal → TCP, DNS, HTTPS: makes HTTPS requests (evidence: `README.md`)
- Laptop user → QCLang Studio: creates quantum programs (evidence: `README.md`)
- QCLang Studio → QCLang compiler: compiles QCLang
- QCLang compiler → Quantum IR: builds QIR (evidence: `tools/compiler/src/main.rs`)
- Quantum IR → Circuit flattening: flattens operations (evidence: `tools/compiler/src/program.rs`)
- Circuit flattening → Local simulator: simulates locally (evidence: `tools/compiler/src/program.rs`)
- QCLang compiler → Quantum runtime: adapts compiled jobs
- Quantum runtime → IBM and IonQ: selects provider
- IBM and IonQ → Quantum cloud QPUs: submits jobs (evidence: `README.md`)
