Prerequisites
Before building Obsidian Chess Studio, ensure you have the required tools installed for your platform.All Platforms
Install Node.js
Platform-Specific Prerequisites
- Windows
- macOS
- Linux
Required:
- Microsoft C++ Build Tools - Install from Visual Studio
- WebView2 - Usually pre-installed on Windows 10/11
- Download the Visual Studio Installer
- Select “Desktop development with C++” workload
- Install required components
Clone Repository
Clone the repository and navigate to the project directory:Install Dependencies
Install all frontend and backend dependencies:- 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:- Starts Vite dev server on
http://127.0.0.1:1420 - Compiles Rust backend in debug mode
- Launches the Tauri application
- Watches for file changes and auto-reloads
Development Server Details
- Frontend: Runs on port
1420with hot module replacement (HMR) - Backend: Compiles with
opt-level = 0for faster builds - Auto-reload: Changes to
.tsx,.ts,.rsfiles trigger rebuild - Debug logging: Enabled by default in dev mode
Production Build
Build optimized production binaries:- All Platforms
- Windows Specific
- macOS Specific
- Linux Specific
- Windows:
src-tauri/target/release/obsidian-chess-studio.exe - macOS:
src-tauri/target/release/bundle/dmg/ - Linux:
src-tauri/target/release/obsidian-chess-studio
pnpm tauri build):- Windows:
.exe,.msiinsrc-tauri/target/release/bundle/ - macOS:
.dmg,.appinsrc-tauri/target/release/bundle/ - Linux:
.AppImage,.deb,.rpminsrc-tauri/target/release/bundle/
Build Optimization
Production builds use aggressive optimizations defined insrc-tauri/Cargo.toml:
- 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:Docker builds are primarily used for Linux targets. For Windows/macOS, native builds are recommended.
Troubleshooting
Common Issues
Windows: 'link.exe' failed with exit code 1120
Windows: 'link.exe' failed with exit code 1120
Solution: This occurs with
lto = "fat". The project uses lto = "thin" by default.If you modified Cargo.toml, ensure:Linux: webkit2gtk not found
Linux: webkit2gtk not found
Solution: Install WebKit2GTK development files:
macOS: 'xcode-select' error
macOS: 'xcode-select' error
Solution: Install Xcode Command Line Tools:If already installed, reset the path:
pnpm install fails
pnpm install fails
Solution: Clear pnpm cache and retry:
Cargo build fails with 'linker not found'
Cargo build fails with 'linker not found'
Solution:
- Windows: Install Visual Studio Build Tools
- Linux: Install
build-essentialorbase-devel - macOS: Install Xcode Command Line Tools
Performance Optimization
To speed up development builds: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
