The OpenPencil desktop app is built with Tauri v2. You need Rust, Bun, and platform-specific build tools installed before building.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/open-pencil/open-pencil/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Install the required tools:- Rust — Install from rustup.rs
- Bun — JavaScript runtime and package manager
- Platform-specific dependencies — See Platform Requirements
Development
Run the desktop app in development mode with hot reload:- Start the Vite dev server at http://localhost:1420
- Compile the Rust backend
- Launch the native window with hot reload enabled
Production Build
Build a production-ready executable:- Run
bun run buildto create the production frontend bundle - Compile the Rust backend in release mode
- Generate a platform-specific installer/package
desktop/target/release/bundle/.
Platform-Specific Builds
macOS Universal Binary
Build a universal binary that runs on both Intel and Apple Silicon:.app bundle that works on all macOS architectures.
Windows ARM64
Build for Windows ARM64 devices:Linux Cross-Compilation
Cross-compiling to other platforms requires their respective toolchains. For production builds targeting multiple platforms, use CI (GitHub Actions) — see.github/workflows/build.yml.
Build Configuration
Key configuration files:desktop/tauri.conf.json— Tauri app config (window size, bundle settings, permissions)desktop/Cargo.toml— Rust dependencies and binary configurationdesktop/build.rs— Build-time Rust code generationpackage.json— Scripts fortauriCLI commands
Build Scripts
Available npm scripts (defined inpackage.json):
| Command | Description |
|---|---|
bun run tauri dev | Dev mode with hot reload |
bun run tauri build | Production build |
bun run tauri build --target <target> | Build for specific target |
Bundle Output
After building, you’ll find:- macOS —
.appbundle and.dmginstaller indesktop/target/release/bundle/macos/anddesktop/target/release/bundle/dmg/ - Windows —
.exeinstaller and.msiindesktop/target/release/bundle/nsis/anddesktop/target/release/bundle/msi/ - Linux —
.deb,.AppImage, and/or.rpmindesktop/target/release/bundle/deb/,desktop/target/release/bundle/appimage/, etc.
Code Signing
macOS
The build is configured to use the signing identity specified indesktop/tauri.conf.json:
Windows
Windows code signing requires an Azure certificate. Configure via environment variables or Tauri’s signing configuration. Unsigned builds will show a Windows Defender SmartScreen warning on first launch.CI Builds
The project includes GitHub Actions workflows that build for all platforms:- Triggered by
v*tags (e.g.,v0.6.0) - Builds 5 targets: macOS (universal), Windows (x64 + ARM64), Linux (x64)
- Creates a draft GitHub Release with all binaries
- Publishes npm packages with provenance
AGENTS.md and .github/workflows/build.yml for CI details.
Troubleshooting
”Internal error” when saving files
File system permissions are missing or misconfigured. Checkdesktop/tauri.conf.json and ensure the save path is whitelisted.