A unified cross-platform interface for the pi-mono coding agent, built with Tauri 2.0. This project provides native applications for Desktop (Windows, macOS, Linux) using a sidecar pattern with the pi-mono agent.
Graphone provides a desktop interface for the pi-mono coding agent using Tauri's sidecar pattern:
| Platform | Pattern | Mechanism |
|---|---|---|
| Desktop | Sidecar | Rust backend spawns Graphone host sidecar (pi-agent) as managed subprocess |
Contributor notes:
CONTRIBUTING.md for repository workflow and staging guidance.Important: pi-mono is a Node.js/TypeScript project, not a Rust project. It's built into a standalone binary using bun:
Frontend (Svelte) āā Tauri Commands āā Rust Backend āā Graphone host sidecar (bun-compiled)
ā
stdin/stdout JSON protocol
The host sidecar is built automatically during Tauri builds via src-tauri/build.rs.
Graphone compiles services/agent-host/dist/cli.js to a standalone binary with bun.
Runtime SDK assets are copied from the pinned npm dependency (node_modules/@mariozechner/pi-coding-agent).
Build Process:
services/agent-host)dist/cli.js using bun build --compilesrc-tauri/binaries/| Target | Requirements |
|---|---|
| Linux Desktop | libgtk-3-dev, libwebkit2gtk-4.1-dev, libappindicator3-dev, clang, lld |
| Windows | cargo-xwin, nsis, lld, llvm for cross-compilation (from WSL2) |
The project uses lld (LLVM linker) for faster linking on Linux and Android targets. Cross-compilation for Windows uses cargo-xwin which automatically handles the Windows SDK libraries and linker configuration.
Configured in src-tauri/.cargo/config.toml:
# Linux x86_64: Use lld for faster linking
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
# Windows x86_64: Use cargo-xwin (no linker config needed)
# cargo-xwin is invoked via --runner flag
# This is handled automatically by npm run build:windows
# Android targets: Use lld
[target.aarch64-linux-android]
linker = "lld"
Windows Cross-Compilation:
# Install NSIS (required for creating Windows installers on Linux)
sudo apt install nsis lld llvm
# Install cargo-xwin (downloads Windows SDK automatically)
cargo install cargo-xwin
# Build for Windows (creates NSIS installer, not MSI)
npm run build:windows
Important: MSI installers can only be created on Windows. Cross-compilation from Linux creates NSIS installers (-setup.exe).
# Install bun (required for sidecar compilation)
curl -fsSL https://bun.sh/install | bash
# Verify bun installation
bun --version # Should show 1.0+
Repository Structure:
projects/
āāā graphone/ # This repository
# Navigate to project
cd graphone
# Install dependencies
npm install
The sidecar is built automatically when you run Tauri commands. The build script (src-tauri/build.rs) handles:
services/agent-host)dist/cli.js with bun build --compile# Desktop (Linux) - recommended shorthand
npm run dev:linux
# Desktop (Windows cross-compile from WSL2)
npm run dev:windows
# Legacy command
npm run tauri dev
Quick Build Commands:
# Linux only
npm run build:linux
# Windows only (cross-compile from WSL2)
npm run build:windows
# Both platforms
npm run build:all
Legacy commands (equivalent):
# Linux
npm run tauri build
# Windows (from WSL2)
npm run tauri build -- --target x86_64-pc-windows-msvc
graphone/
āāā apps/
ā āāā desktop/
ā āāā web/ # Svelte frontend application
ā āāā src/ # Routes, components, stores, handlers
ā āāā static/ # Static frontend assets
āāā src-tauri/ # Rust/Tauri desktop shell
ā āāā src/ # Commands, sidecar bridge, state
ā āāā binaries/ # Sidecar binaries + runtime assets (auto-populated)
ā āāā capabilities/ # Tauri permissions (desktop/mobile)
ā āāā build.rs # Builds bundled sidecar binary via bun
ā āāā Cargo.toml
ā āāā tauri.conf.json
āāā services/
ā āāā agent-host/ # Graphone host sidecar source (TypeScript)
ā āāā src/
ā āāā dist/
āāā tooling/
ā āāā scripts/ # Build/run/verification helpers
āāā reports/ # Benchmark and measurement output
āāā package.json
Frontend canonical paths:
apps/desktop/web/srcapps/desktop/web/staticCanonical repo map (quick):
apps/desktop/web ā Svelte frontend workspacesrc-tauri ā Rust/Tauri desktop shellservices/agent-host ā bun-compiled host sidecar sourcetooling/scripts ā build/run/verification helpersThis project is developed in WSL2 on Windows 11.
Critical: Keep the project in the Linux filesystem (e.g., /home/username/projects/), NOT in /mnt/c/ (Windows filesystem) - performance difference is 10-100x.
The sidecar binary is built automatically via src-tauri/build.rs:
services/agent-host)bun build --compile ./dist/cli.jssrc-tauri/binaries/ with Tauri sidecar namingpackage.json, docs/examples, theme, export-html, photon_rs_bg.wasm) from @mariozechner/pi-coding-agentEnvironment Variables:
CARGO_MANIFEST_DIR: Used to locate the project rootTARGET: Target triple for cross-compilationCARGO_CFG_TARGET_OS: Used to detect mobile builds (skipped)@mariozechner/pi-coding-agent)Convenience npm scripts for cross-platform builds:
| Script | Platform | Description |
|---|---|---|
npm run dev:linux |
Linux | Run dev server (native) |
npm run dev:windows |
Windows | Run dev server (cross-compile) |
npm run build:linux |
Linux | Build AppImage/Deb packages |
npm run build:windows |
Windows | Build NSIS installer (requires NSIS) |
npm run build:windows:exe |
Windows | Build only .exe (no installer) |
npm run build:windows:portable |
Windows | Build .exe + stage portable runtime folder (src-tauri/target/x86_64-pc-windows-msvc/release/portable) |
npm run build:all |
Both | Build Linux + Windows packages |
npm run run:windows |
Windows | Build (if needed), stage portable runtime, & launch Windows app from WSL2 |
Examples:
# Quick development - Linux
npm run dev:linux
# Build for both platforms from WSL2
npm run build:all
# Build and run Windows app directly from WSL2
npm run run:windows
# Build only the Windows executable (fastest, no NSIS needed)
npm run build:windows:exe
# Build and stage a portable Windows runtime folder (copy this folder to Windows)
npm run build:windows:portable
The project uses a custom .cargo/config.toml for optimized builds and cross-compilation:
[build]
# Linker settings are configured per-target below
[profile.dev]
# Faster debug builds with incremental compilation
incremental = true
codegen-units = 16
[profile.release]
# Optimized release builds with thin LTO
lto = "thin"
codegen-units = 1
opt-level = 3
# Linux: Use lld for faster linking
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]
# Windows: Use cargo-xwin (configured via CARGO env var)
# No linker config needed - cargo-xwin handles SDK libs and linking
# [target.x86_64-pc-windows-msvc]
# linker = "lld-link" # Don't set - use CARGO=cargo-xwin instead
# Android: Use lld (included in NDK)
[target.aarch64-linux-android]
linker = "lld"
Benefits:
Key configuration for sidecar support:
{
"bundle": {
"externalBin": ["binaries/pi-agent"]
},
"plugins": {
"shell": {
"open": true
}
}
}
See TROUBLESHOOTING.md for common issues and solutions.
Graphone builds and ships a local host sidecar from services/agent-host.
To develop sidecar behavior:
services/agent-host/src/*bun tooling/scripts/verify-path-b-host.mjsnpm run build:linux (or cargo build --manifest-path src-tauri/Cargo.toml)MIT License - See LICENSE for details.
Status: Active development | Last Updated: February 19, 2026