Prerequisites
Install Node.js 18+
Download from nodejs.org or use a version manager:nvm install 18
nvm use 18
nvm install 18
nvm use 18
Install pnpm 10.28.2
Fast, disk-efficient package manager:npm install -g pnpm@10.28.2
Verify installation:pnpm --version
# Should output: 10.28.2
Install Rust (latest stable)
Install via rustup:curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Download and run rustup-init.exe from https://rustup.rs/
Verify installation:rustc --version
cargo --version
Install Tauri system dependencies
macOS
Linux (Ubuntu/Debian)
Windows
# Install Xcode Command Line Tools
xcode-select --install
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
Clone Repository
git clone https://github.com/YourOrg/Glyph.git
cd Glyph
Install Dependencies
Install frontend dependencies
This installs all packages from package.json. Install Rust dependencies
Rust dependencies are automatically downloaded during first build.To verify Rust setup:
Editor Setup
VS Code (Recommended)
Install recommended extensions:
{
"recommendations": [
"rust-lang.rust-analyzer", // Rust language support
"tauri-apps.tauri-vscode", // Tauri tooling
"biomejs.biome", // Linting + formatting
"bradlc.vscode-tailwindcss" // Tailwind IntelliSense
]
}
Settings
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
},
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
},
"rust-analyzer.check.command": "clippy"
}
Environment Variables
Optional: AI Provider Keys
Create .env in project root for development API keys:
# OpenAI
OPENAI_API_KEY=sk-...
# Anthropic
ANTHROPIC_API_KEY=sk-ant-...
# Google Gemini
GEMINI_API_KEY=...
These are optional. Glyph stores API keys in the user’s space via the settings UI. .env is only for testing during development.
Verify Setup
Run these commands to verify everything is working:
Frontend typecheck
pnpm build
# Should complete without errors
Rust typecheck
cd src-tauri
cargo check
# Should complete without errors
Linting
pnpm check
# Should pass all Biome checks
Tests
pnpm test
# Should pass all Vitest tests
Running the App
Development Mode
This:
- Starts Vite dev server with HMR
- Compiles Rust backend
- Opens native desktop window
- Auto-reloads on file changes
Opens Vite dev server at http://localhost:5173.Tauri commands will not work in this mode. Use for UI-only development.
Hot Reload Behavior
- Frontend changes (TypeScript/React/CSS): Instant HMR
- Rust changes: Full recompile (~5-30s depending on changes)
Troubleshooting
”pnpm: command not found"
"rustc: command not found”
Restart terminal after installing Rust, or run:
Tauri dev fails with “webkit2gtk not found” (Linux)
sudo apt install libwebkit2gtk-4.1-dev
“error: linker cc not found” (Linux)
sudo apt install build-essential
macOS: “xcrun: error: invalid active developer path”
Windows: “error: the cargo binary is missing”
Ensure %USERPROFILE%\.cargo\bin is in your PATH. Restart terminal after installing Rust.
pnpm install fails with EACCES
# Fix npm global permissions
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modules
Biome errors in VS Code
Ensure Biome extension is installed and enabled:
code --install-extension biomejs.biome
Next Steps
Building
Learn how to build production releases
Testing
Run tests and write new ones
Architecture
Understand the codebase structure
Tauri Commands
Learn IPC communication