Skip to main content

Prerequisites

Koharu is developed against Rust 1.97.1 with the 2024 edition, Bun 1.3.14, and LLVM 22.1.8. The repository does not pin these versions. LLVM supplies the libclang that bindgen needs in the -sys crates; the native libraries themselves are prebuilt packages downloaded at runtime, so no C++ build system is required.
Install MSVC C/C++ build tools for native dependencies.

Start development

bun dev launches the Next.js UI and Tauri app. It builds koharu-canvas for WASM with wasm-pack into packages/bridge/src/wasm, then watches koharu-canvas and koharu-rasterizer and rebuilds on change. Turbopack refreshes the browser client after successful rebuilds. Debug builds expose CEF remote debugging at http://127.0.0.1:4000.

Check the affected component

Run the smallest relevant debug check or focused test once. For example:
For frontend work, use the package’s focused test or typecheck command. Repository formatting checks are available through bun run check; bun run lint runs frontend linting.
Do not run full suites, non-debug profiles, or end-to-end tests by default. Run them only when explicitly requested.

Regenerate IPC bindings

Rust command signatures and Specta types are authoritative:
Do not hand-edit packages/bridge/src/protocol.ts.

Build an executable

When you need a release executable, bun run build invokes tauri build --no-bundle and writes to target/release. Installer packaging belongs to the release workflow.

Work on the documentation

Preview Mintlify and maintain the English, Japanese, and Chinese documentation.