Prerequisites
Required Tools
Install Node.js 18+
Download from nodejs.org or use a version manager:
nvm install 18
nvm use 18nvm install 18
nvm use 18Install pnpm 10.28.2
Fast, disk-efficient package manager:
npm install -g pnpm@10.28.2Verify installation:
pnpm --version
# Should output: 10.28.2Install 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 --versionInstall Tauri system dependencies
# Install Xcode Command Line Tools
xcode-select --installsudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-devInstall:
- Microsoft C++ Build Tools
- WebView2 (usually pre-installed on Windows 11)
Clone Repository
git clone https://github.com/YourOrg/Glyph.git
cd GlyphInstall Dependencies
Install frontend dependencies
pnpm installThis installs all packages from package.json.
Install Rust dependencies
Rust dependencies are automatically downloaded during first build.
To verify Rust setup:
cd src-tauri
cargo checkEditor 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=...Note
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 errorsRust typecheck
cd src-tauri
cargo check
# Should complete without errorsLinting
pnpm check
# Should pass all Biome checksTests
pnpm test
# Should pass all Vitest testsRunning the App
Development Mode
pnpm tauri devThis:
- Starts Vite dev server with HMR
- Compiles Rust backend
- Opens native desktop window
- Auto-reloads on file changes
pnpm devOpens Vite dev server at http://localhost:5173.
Warning
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"
npm install -g pnpm"rustc: command not found”
Restart terminal after installing Rust, or run:
source $HOME/.cargo/envTauri dev fails with “webkit2gtk not found” (Linux)
sudo apt install libwebkit2gtk-4.1-dev“error: linker cc not found” (Linux)
sudo apt install build-essentialmacOS: “xcrun: error: invalid active developer path”
xcode-select --installWindows: “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_modulesBiome errors in VS Code
Ensure Biome extension is installed and enabled:
code --install-extension biomejs.biome