Skip to main content

Prerequisites

Before building Obsidian Chess Studio, ensure you have the required tools installed for your platform.

All Platforms

1

Install Node.js

Download and install Node.js 18+ from nodejs.orgVerify installation:
node --version
npm --version
2

Install pnpm

Install the pnpm package manager:
npm install -g [email protected]
Verify installation:
pnpm --version
3

Install Rust

Install Rust via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Verify installation:
rustc --version
cargo --version

Platform-Specific Prerequisites

Required:
  • Microsoft C++ Build Tools - Install from Visual Studio
  • WebView2 - Usually pre-installed on Windows 10/11
Install Visual Studio Build Tools:
  1. Download the Visual Studio Installer
  2. Select “Desktop development with C++” workload
  3. Install required components
Verify:
# Check if build tools are available
where cl.exe

Clone Repository

Clone the repository and navigate to the project directory:
git clone [email protected]:luisrivasnoriega/Obsidian-Chess-Studio.git
cd Obsidian-Chess-Studio
Or using HTTPS:
git clone https://github.com/luisrivasnoriega/Obsidian-Chess-Studio.git
cd Obsidian-Chess-Studio

Install Dependencies

Install all frontend and backend dependencies:
pnpm install
This command:
  • Installs Node.js packages from package.json
  • Downloads Rust dependencies (first run only)
  • Sets up the development environment
First run may take several minutes as Cargo downloads and compiles Rust dependencies.

Development Mode

Run the application in development mode with hot reload:
pnpm dev
This command:
  1. Starts Vite dev server on http://127.0.0.1:1420
  2. Compiles Rust backend in debug mode
  3. Launches the Tauri application
  4. Watches for file changes and auto-reloads
# Full dev mode (frontend + backend)
pnpm dev

Development Server Details

  • Frontend: Runs on port 1420 with hot module replacement (HMR)
  • Backend: Compiles with opt-level = 0 for faster builds
  • Auto-reload: Changes to .tsx, .ts, .rs files trigger rebuild
  • Debug logging: Enabled by default in dev mode

Production Build

Build optimized production binaries:
# Build with bundled installer (recommended)
pnpm tauri build

# Build without installer (binary only)
pnpm build
# or
pnpm tauri build --no-bundle
Build output locations:
  • Windows: src-tauri/target/release/obsidian-chess-studio.exe
  • macOS: src-tauri/target/release/bundle/dmg/
  • Linux: src-tauri/target/release/obsidian-chess-studio
Installers (with pnpm tauri build):
  • Windows: .exe, .msi in src-tauri/target/release/bundle/
  • macOS: .dmg, .app in src-tauri/target/release/bundle/
  • Linux: .AppImage, .deb, .rpm in src-tauri/target/release/bundle/

Build Optimization

Production builds use aggressive optimizations defined in src-tauri/Cargo.toml:
[profile.release]
opt-level = 3          # Maximum optimization
lto = "thin"           # Thin Link-Time Optimization
codegen-units = 1      # Better optimization
strip = true           # Remove debug symbols
panic = "abort"        # Smaller binary
Expected build times:
  • Debug build: 2-5 minutes
  • Release build: 5-20 minutes
  • First build: Significantly longer due to dependency compilation

Docker Build

Build using Docker for a consistent environment:
1

Build Docker Image

docker build -t obsidian-chess-studio .
2

Run Container

docker run -d --name obsidian-chess-studio-app obsidian-chess-studio
3

Extract Binary

docker cp obsidian-chess-studio-app:/output/obsidian-chess-studio ./obsidian-chess-studio
Docker builds are primarily used for Linux targets. For Windows/macOS, native builds are recommended.

Troubleshooting

Common Issues

Solution: Install WebKit2GTK development files:
# Debian/Ubuntu
sudo apt install libwebkit2gtk-4.1-dev

# Fedora
sudo dnf install webkit2gtk4.1-devel
Solution: Install Xcode Command Line Tools:
xcode-select --install
If already installed, reset the path:
sudo xcode-select --reset
Solution: Clear pnpm cache and retry:
pnpm store prune
pnpm install --force
Solution:
  • Windows: Install Visual Studio Build Tools
  • Linux: Install build-essential or base-devel
  • macOS: Install Xcode Command Line Tools

Performance Optimization

To speed up development builds:
# Use mold linker (Linux only, much faster)
cargo install mold
export RUSTFLAGS="-C link-arg=-fuse-ld=mold"

# Enable parallel frontend builds
export VITE_BUILD_PARALLEL=true

Next Steps

Project Structure

Understand the codebase organization

Contributing

Learn how to contribute code

Testing

Run tests and add new ones

Architecture

Deep dive into the architecture

Build docs developers (and LLMs) love