Skip to content

Install & build

ToolVersionNotes
Node.js20+22.12+ if you also build the docs site (docs-site/)
Rustlatest stablevia rustup
Python3.10+with pip — the kernel uses PEP 604 syntax at import time, so 3.9 crashes
Tauri CLI2.xcargo install tauri-cli
Terminal window
git clone https://github.com/calelamb/nuclei.git
cd nuclei
npm install
pip install -r kernel/requirements.txt # for running the kernel standalone
cp .env.example .env # optional — Dirac dev key, kernel port
npm run tauri dev

npm run tauri dev gives you frontend HMR and automatic Rust rebuilds. In dev the shell finds the kernel at <repo>/kernel/server.py; in packaged builds the kernel/ directory is bundled as a Tauri resource.

All verified against package.json scripts:

CommandWhereWhat it does
npm run tauri devrepo rootDesktop app with hot reload
npm run tauri buildrepo rootPackage installers (.dmg / .msi / .AppImage, .deb)
npm run dev:webrepo rootBrowser build dev server (Pyodide kernel)
npm run build:webrepo rootBrowser build → dist-web/
npm testrepo rootFrontend tests (Vitest)
npm run lintrepo rootESLint
python3 -m pytest kernel/testsrepo rootKernel test suite — including the protocol fixtures the Kernel API docs replay
cargo testsrc-tauri/Compiles and runs the Rust suite — currently no unit tests exist, so this is a build check
cd kernel && python server.pyRun the kernel standalone (see Kernel API)
npm install && npm run builddocs-site/Build this docs site (Astro/Starlight, Node 22.12+)
nuclei/
├── src-tauri/ # Rust shell: kernel spawn, venv management, IPC commands
├── src/ # React frontend (also the browser build)
│ ├── components/ # editor, circuit, bloch, histogram, dirac, hardware, layout
│ ├── stores/ # Zustand state
│ ├── hooks/ # useKernel, useDirac, ...
│ └── platform/ # PlatformBridge: tauriBridge vs webBridge + pyodideKernel
├── kernel/ # Python kernel
│ ├── server.py # WebSocket entry point
│ ├── executor.py # framework detection + execution
│ ├── adapters/ # qiskit / cirq / cudaq / qsharp → CircuitSnapshot
│ ├── hardware/ # providers, credential store, job store
│ └── tests/ # pytest suite + docs protocol fixtures
├── docs-site/ # this site (standalone Astro project)
├── landing/ # nuclei.dev landing page
└── scripts/ # build helpers

The packaged app does not bundle Python. Instead, the shell maintains a private venv in the app data directory and runs the kernel from it — keeping kernel dependencies out of the user’s site-packages and surviving their Python upgrades.

Location<appDataDir>/venv — concrete per-OS paths in configuration
Interpreter probe orderpython3.13python3.12python3.11python3.10python3python; first hit with minor ≥ 10 wins, so a version-specific binary beats a generic symlink
Minimum Python3.10 (MIN_PYTHON_MINOR) — older interpreters fail at kernel import on PEP 604 unions
Core depswebsockets, numpy, keyring — force-installed on every launch if missing
FrameworksInstalled on demand from the framework catalog via the setup wizard

Auto-rebuild: if an existing venv was built from Python < 3.10 (a real field failure — Xcode shipped 3.9 for years), ensure_kernel_runtime snapshots which catalog frameworks were importable, renames the old venv to venv.broken, rebuilds from the newest 3.10+ interpreter, re-installs core deps plus the snapshotted frameworks, then deletes the backup on success. Failures keep venv.broken around for inspection.

If no Python 3.10+ exists on PATH at all, the kernel spawn falls back to system python3 — and the UI tells the user to install Python from python.org.