Docs

Contributing

Ship code to Kaku: local setup, day-to-day build commands, Pull Request flow, and CI checks.

#Setup

Clone the repo, install the Rust toolchain, then install the local dev tools and the git hook.

git clone https://github.com/tw93/Kaku.git
cd Kaku

# Install Rust if it isn't already available (Homebrew keeps rustup keg-only)
brew install rustup
echo "export PATH=\"$(brew --prefix rustup)/bin:\$HOME/.cargo/bin:\$PATH\"" >> ~/.zprofile
exec zsh -l
rustup toolchain install 1.93.0

# Install required tools (cargo-nextest, cargo-watch, nightly rustfmt)
make install-tools

# Install pre-commit hook (format + test before each commit)
make install-hooks

#Development

Make targets cover formatting, type checks, tests, and local runs.

CommandPurpose
make fmtAuto-format code, requires nightly Rust
make fmt-checkCheck formatting without modifying files
make checkCompile check, catch type and syntax errors
make testRun unit tests
make devFast local debug: build kaku-gui and run from target/debug
make buildCompile binaries (no app bundle)
make appBuild debug app bundle to dist/Kaku.app

Recommended workflow:

make fmt        # format first
make check      # verify it compiles
make test       # run tests
make dev        # fast local run without packaging

Override the log level for make dev:

RUST_LOG=debug make dev

#Build Release

Reproduce release artifacts locally. Official releases run through scripts/release.sh.

# Build app and DMG, release, universal binary
./scripts/build.sh
# Outputs: dist/Kaku.app and dist/Kaku.dmg

# Build for current architecture only, faster for local testing
./scripts/build.sh --native-arch

# Build app bundle only, skip DMG creation
./scripts/build.sh --native-arch --app-only

# Build and open the app automatically
./scripts/build.sh --native-arch --open

#Pull Requests

  1. Fork the repo and branch from main.
  2. Make your changes.
  3. Run make fmt && make check && make test locally.
  4. Commit and push.
  5. Open a PR targeting main.

CI runs in order: format check, unit tests, cargo check, universal build validation. Any red step needs to be fixed first.

Browse open Pull Requests