Components
QuantaBox is a Rust Cargo workspace plus a Tauri desktop app. This document describes each component and its responsibilities.
Workspace Overview #
| Crate | Responsibility |
|---|---|
quantabox-core | VM lifecycle and configuration, hypervisor backends, disk/network/display/snapshot/ssh/usb/shared-folder management, unattended-install media. |
quantabox-crypto | AES-256-GCM, ML-KEM-768, SHA3-256, sector-level disk encryption, and the key vault. |
quantabox-iso | The OS image catalog, async downloader, and checksum verification. |
quantabox-backup | Encrypted VM export/import and compressed backup/restore. |
quantabox-cli | The quantabox command-line interface. |
quantabox-gui | The Tauri desktop application (Rust backend + Svelte frontend). |
quantabox-core #
The heart of the system. Notable modules:
| Module | Provides |
|---|---|
vm | VmConfig and related types, plus the VM manager (create/start/stop/clone/delete). |
disk | create_disk, resize_disk, convert_disk, disk_info over qemu-img. |
network | Virtual network model, default NAT/host-only presets, MAC generation, SSH port forwarding. |
snapshot | create/delete/list/restore over qemu-img snapshot. |
hypervisor | The HypervisorBackend trait and the KVM, Hyper-V, and HVF implementations, plus detection and binary discovery. |
display | VNC/SPICE display server configuration and QEMU args. |
ssh | SshConnectionInfo and generation of SSH command, OpenSSH config, batch, and Bitvise profiles. |
shared_folders | virtio-9p share configuration and QEMU args. |
usb | Host USB enumeration and passthrough args. |
unattended | cloud-init ISO and Windows autounattend floppy generation. |
proc | Cross-platform child-process helper that suppresses console windows on Windows. |
The proc helper
Because the GUI runs as a windowed (non-console) app, spawning a console subprocess on Windows would otherwise pop a visible terminal. The proc module exposes a NoConsole trait with a no_console() method that applies the CREATE_NO_WINDOW creation flag on Windows and is a no-op on Linux/macOS. Every process spawn in the codebase (qemu-system-x86_64, qemu-img, PowerShell probes, taskkill, tasklist, openssl, certutil) routes through it.
quantabox-crypto #
Implements the post-quantum encryption stack:
| Module | Provides |
|---|---|
aes_gcm | Key/nonce generation, counter-derived nonces, encrypt/decrypt, and SHA3-256. |
mlkem | ML-KEM-768 keypair generation, encapsulate/decapsulate, and DEK wrap/unwrap. |
disk_encryption | Sector encryption/decryption and the on-disk encryption header. |
vault | A JSON key vault that stores wrapped keys under a master key. |
The algorithm identifier is ML-KEM-768+AES-256-GCM. See Cryptography Internals for formats and flows.
quantabox-iso #
A curated catalog of 40+ operating systems with metadata (name, version, size, category, tags, download and checksum URLs). Provides:
builtin_catalog()-- the full catalog.search_catalog(query, catalog)andfilter_by_category(category, catalog).- An async downloader with progress reporting (bytes, speed, ETA), writing to a
.partfile and atomically renaming on completion. - SHA3-256 verification of downloaded images.
quantabox-backup #
Handles moving and protecting whole VMs:
- Export/import -- a
QBOX_PKGpackage format containing the VM config plus disk data, optionally encrypted per sector with AES-256-GCM (counter-derived nonces). - Backup/restore --
.qvbkfiles with a JSON manifest, LZ4 compression, optional AES-256-GCM encryption, and SHA3-256 integrity checksums.
quantabox-cli #
A clap-based binary named quantabox. Commands map directly onto core operations: list, create, start, stop, pause, resume, delete, info, clone, snapshot {create,list,restore,delete}, iso {browse,search,download,list}, package {export,import}, and status. See the CLI Reference.
quantabox-gui #
A Tauri 1.x app with a Svelte 4 + TypeScript + Tailwind frontend and an embedded noVNC console.
- Backend (Rust) exposes Tauri commands grouped by area -- VM management, ISO library, snapshots, and system/settings -- each delegating to
quantabox-coreand the sibling crates. - Frontend renders the VM list, details tabs (Details, Snapshots, Console, Logs, SSH), the ISO library, settings, and the create-VM and settings dialogs.
- Production builds embed the compiled frontend via Tauri's
custom-protocolfeature so the app serves its UI internally rather than from a dev server. See Building from Source.
Dependency Direction #
The front ends depend on the core (and, for the GUI, the ISO/backup crates directly); the core depends on crypto; backup depends on crypto. There are no cycles.
quantabox-gui --+
+--> quantabox-core --> quantabox-crypto
quantabox-cli --+ |
+----------> quantabox-iso
+----------> quantabox-backup --> quantabox-crypto