Development Setup

Complete environment setup guide for Cheolsu Proxy development.

Technology Stack

This project uses the following tools and technologies:

  • Rust: Core backend language with Cargo package manager
  • Tauri: Desktop application framework
  • bun: Node.js-compatible runtime and package manager (version pinned in mise.toml)
  • oxc: JavaScript/TypeScript toolchain for formatting (oxfmt) and linting (oxlint)
  • Rspress: Documentation site generator

System Requirements

Operating System

  • macOS: 10.15 (Catalina) or higher
  • Windows: Windows 10 or higher

Hardware

  • RAM: Minimum 8GB (16GB recommended)
  • Storage: At least 10GB free space
  • CPU: 64-bit processor

Essential Software Installation

1. Rust Installation

macOS

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Load environment variables
source ~/.cargo/env

# Verify installation
rustc --version
cargo --version

Windows

  1. Download rustup-init.exe from rustup.rs
  2. Run and follow the installation wizard
  3. Verify in PowerShell:
    rustc --version
    cargo --version

This project pins Node.js, Bun, and Rust versions via mise.

# Install mise (if needed)
curl https://mise.run | sh

# From repo root, install tools per mise.toml
cd cheolsu-proxy
mise install

# Verify
node --version
bun --version
rustc --version

3. Node.js / Bun manual install (without mise)

macOS (Homebrew)

brew install node bun

Windows

  1. Download LTS from nodejs.org
  2. Install Bun
  3. Verify in PowerShell:
    node --version
    bun --version

4. Tauri CLI Installation

# Install Tauri CLI
cargo install tauri-cli

# Verify installation
tauri --version

5. Development Tools Installation

Rust Tools

# Code formatting
rustup component add rustfmt

# Linter
rustup component add clippy

# Documentation generation
rustup component add rust-docs

# Source code
rustup component add rust-src

Additional Rust Tools

# Code analysis
cargo install cargo-audit
cargo install cargo-outdated

# Performance analysis
cargo install flamegraph

# Test coverage
cargo install cargo-tarpaulin

Project Setup

1. Repository Clone

# Clone repository
git clone https://github.com/ohah/cheolsu-proxy.git
cd cheolsu-proxy

# Verify remote repository settings
git remote -v

2. Dependency Installation

Rust Dependencies

# From root directory
cargo build

# Build all packages
cargo build --workspace

Node.js Dependencies

# Navigate to Tauri UI directory
cd desktop

# Install dependencies
bun install

3. Development Server

# Run Tauri development server
cd desktop
bun run tauri dev

IDE Setup

Essential Extensions

{
  "recommendations": [
    "rust-lang.rust-analyzer",
    "vadimcn.vscode-lldb",
    "ms-vscode.vscode-typescript-next",
    "bradlc.vscode-tailwindcss",
    "oxc.oxc",
    "ms-vscode.vscode-json"
  ]
}

Settings File (.vscode/settings.json)

{
  "rust-analyzer.checkOnSave.command": "clippy",
  "rust-analyzer.cargo.features": "all",
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "rust-lang.rust-analyzer",
  "[typescript]": {
    "editor.defaultFormatter": "oxc.oxc"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "oxc.oxc"
  }
}

IntelliJ IDEA / CLion

Rust Plugin

  1. File > Settings > Plugins
  2. Search for "Rust" and install
  3. Set Rust toolchain path

Settings

  • Rust toolchain: ~/.cargo/bin/rustc
  • Cargo path: ~/.cargo/bin/cargo

Build and Test

1. Build

# Development build
cargo build

# Release build
cargo build --release

# Build specific package only
cargo build -p proxyapi_v2

# Build with all features
cargo build --features "native-tls-client,rcgen-ca,openssl-ca"

2. Test

# Run all tests
cargo test

# Run specific test
cargo test test_name

# Integration tests
cargo test --test integration_test

# Benchmarks
cargo bench

3. Code Quality Checks

# Code formatting
cargo fmt

# Run linter
cargo clippy

# Security check
cargo audit

# Check outdated dependencies
cargo outdated

Tauri UI Development

1. Development Server

# Tauri UI development server
cd desktop
bun run dev

# Run with Tauri app
bun run tauri dev

2. Build

# Web build
bun run build

# Tauri app build
bun run tauri build

3. Test

To be added.

Debugging

Tauri Debugging

# Run in debug mode
cd desktop
RUST_LOG=debug bun run tauri dev

Open Developer Tools

Cmd + shift + I

Tauri Build Errors

# Clear cache
cargo clean
# Reinstall Tauri CLI
cargo install tauri-cli --force

# Check system dependencies
# macOS: Xcode Command Line Tools
# Windows: Visual Studio Build Tools

Platform-Specific Issues

macOS

# Install Xcode Command Line Tools
xcode-select --install

# Update Homebrew
brew update && brew upgrade

Windows

# Install Visual Studio Build Tools
# https://visualstudio.microsoft.com/visual-cpp-build-tools/

# Verify Windows SDK installation

Next Steps

After setting up your development environment, refer to the following documents: