Components

Technical QuantaBox

QuantaBox is a Rust Cargo workspace plus a Tauri desktop app. This document describes each component and its responsibilities.

Workspace Overview #

CrateResponsibility
quantabox-coreVM lifecycle and configuration, hypervisor backends, disk/network/display/snapshot/ssh/usb/shared-folder management, unattended-install media.
quantabox-cryptoAES-256-GCM, ML-KEM-768, SHA3-256, sector-level disk encryption, and the key vault.
quantabox-isoThe OS image catalog, async downloader, and checksum verification.
quantabox-backupEncrypted VM export/import and compressed backup/restore.
quantabox-cliThe quantabox command-line interface.
quantabox-guiThe Tauri desktop application (Rust backend + Svelte frontend).

quantabox-core #

The heart of the system. Notable modules:

ModuleProvides
vmVmConfig and related types, plus the VM manager (create/start/stop/clone/delete).
diskcreate_disk, resize_disk, convert_disk, disk_info over qemu-img.
networkVirtual network model, default NAT/host-only presets, MAC generation, SSH port forwarding.
snapshotcreate/delete/list/restore over qemu-img snapshot.
hypervisorThe HypervisorBackend trait and the KVM, Hyper-V, and HVF implementations, plus detection and binary discovery.
displayVNC/SPICE display server configuration and QEMU args.
sshSshConnectionInfo and generation of SSH command, OpenSSH config, batch, and Bitvise profiles.
shared_foldersvirtio-9p share configuration and QEMU args.
usbHost USB enumeration and passthrough args.
unattendedcloud-init ISO and Windows autounattend floppy generation.
procCross-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:

ModuleProvides
aes_gcmKey/nonce generation, counter-derived nonces, encrypt/decrypt, and SHA3-256.
mlkemML-KEM-768 keypair generation, encapsulate/decapsulate, and DEK wrap/unwrap.
disk_encryptionSector encryption/decryption and the on-disk encryption header.
vaultA 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) and filter_by_category(category, catalog).
  • An async downloader with progress reporting (bytes, speed, ETA), writing to a .part file and atomically renaming on completion.
  • SHA3-256 verification of downloaded images.

quantabox-backup #

Handles moving and protecting whole VMs:

  • Export/import -- a QBOX_PKG package format containing the VM config plus disk data, optionally encrypted per sector with AES-256-GCM (counter-derived nonces).
  • Backup/restore -- .qvbk files 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-core and 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-protocol feature 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