Skip to main content

Available Commands

Development

Type Checking

Linting & Formatting

Testing

Production Build

Build Desktop App

This command:
1

TypeScript type check

Runs tsc to verify frontend types
2

Vite production build

Bundles frontend to src-tauri/target/release/bundle/
  • Minifies JavaScript/CSS
  • Optimizes images
  • Generates source maps (optional)
3

Rust release build

Compiles Rust with optimizations:
  • Full optimizations (-O3 equivalent)
  • No debug symbols (smaller binary)
  • Takes ~2-5 minutes
4

Create platform bundles

Generates installers for current platform

Output Artifacts

Separate builds needed for x86_64 (Intel) and aarch64 (Apple Silicon)

Pre-push Checklist

Before pushing to remote, run:
This verifies:
  • ✅ Code is formatted (Biome)
  • ✅ No linting errors (Biome)
  • ✅ TypeScript compiles
  • ✅ Rust compiles
Add this as a Git pre-push hook:
.git/hooks/pre-push
Make executable:

Build Optimization

Rust Release Profile

Configured in src-tauri/Cargo.toml:
Cargo.toml

Vite Build Options

Configured in vite.config.ts:
vite.config.ts

Platform-Specific Builds

macOS: Universal Binary

Build for both Intel and Apple Silicon:

Windows: 32-bit and 64-bit

Linux: Multiple Distros

CI/CD Pipeline

GitHub Actions Example

.github/workflows/build.yml

Versioning

Version is stored in two places and must match:
package.json
src-tauri/Cargo.toml
If versions don’t match, build will fail. Use a script to sync versions:
scripts/bump-version.sh
Usage: ./scripts/bump-version.sh 0.1.11

Bundle Size Analysis

Frontend Bundle

Rust Binary Size

Reduce Binary Size

  1. Strip symbols (enabled by default in release profile)
  2. Enable LTO (enabled by default)
  3. Use wee_alloc (minimal allocator):
    Cargo.toml

Debug Builds

For debugging production issues:

Next Steps

Testing

Write and run tests

Architecture

Understand the codebase