Before building the OpenPencil desktop app, you need to install Rust, Bun, and platform-specific development tools. Follow the instructions for your operating system below.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.
All Platforms
Rust
Install Rust using rustup:Bun
Install Bun (JavaScript runtime and package manager):macOS
Install Xcode Command Line Tools:- Clang — C/C++ compiler for Rust native dependencies
- macOS SDK — System headers and frameworks
- Git — Version control (if not already installed)
Building Universal Binaries
To build universal binaries (Intel + Apple Silicon), add both Rust targets:Windows
1. Rust with MSVC Toolchain
Download and run the Rust installer from rustup.rs. During installation, select the stable-msvc toolchain. If you already have Rust installed with a different default, switch to MSVC:2. Visual Studio Build Tools
Install Visual Studio Build Tools with the “Desktop development with C++” workload. This provides:- MSVC compiler — Required for Rust native dependencies
- Windows SDK — System headers and libraries
3. WebView2 Runtime
WebView2 is pre-installed on:- Windows 10 (version 1803 and later)
- Windows 11 (all versions)
msedgewebview2.exe in C:\Program Files (x86)\Microsoft\EdgeWebView\Application\.
Building for ARM64
To build for Windows ARM64, add the target:Linux
The OpenPencil desktop app requires WebKit2GTK and several system libraries. Install them using your distribution’s package manager.Debian / Ubuntu
Install all required dependencies:- libwebkit2gtk-4.1-dev — WebKit rendering engine (Tauri’s webview)
- build-essential — GCC, G++, make, and other build tools
- curl, wget, file — Download and file type utilities
- libxdo-dev — X11 automation library
- libssl-dev — OpenSSL headers for Rust crypto crates
- libayatana-appindicator3-dev — System tray support
- librsvg2-dev — SVG rendering library
Fedora / RHEL / CentOS
Arch Linux
Other Distributions
For other Linux distributions, see the official Tauri v2 prerequisites guide.Verification
After installing all prerequisites, verify your setup:Troubleshooting
macOS: “xcode-select: error: tool ‘xcodebuild’ requires Xcode”
You installed the full Xcode app instead of Command Line Tools. Either:- Use the full Xcode (larger download, includes IDE)
- Or uninstall Xcode and install Command Line Tools only
Windows: Rust targets wrong toolchain
Ensurestable-msvc is the default:
stable-gnu, switch to MSVC.
Linux: Missing libraries
Error messages will indicate which library is missing. Search for the package name in your distribution’s package manager. For example:libwebkit2gtk-4.1-dev (Debian/Ubuntu) or equivalent.
Version conflicts
If you encounter build errors after updating dependencies:- Clear build cache:
cargo clean(indesktop/directory) - Update Rust:
rustup update - Reinstall Node modules:
rm -rf node_modules && bun install
CI Environment
For automated builds (GitHub Actions, GitLab CI, etc.), thebuild.yml workflow installs all dependencies and builds for multiple platforms. See .github/workflows/build.yml for the complete CI setup.