Skip to content

Build from Source

github-actions edited this page Nov 27, 2026 · 3 revisions

Build from Source

Build and test Canopy with an isolated app home and core for development.

Requirements

The README lists what every platform needs: Rust 1.95 or newer, Zig 0.16 and herdr-core. just and Bun are optional and only run the full test suite.

On macOS, install the Xcode command line tools (xcode-select --install). If you install Zig with Homebrew, its zig@0.16 keg is not on your PATH by default, so add this line to your shell profile:

export PATH="$(brew --prefix zig@0.16)/bin:$PATH"

On Debian or Ubuntu, install the build tools and the libraries the window and fonts need:

sudo apt-get install build-essential pkg-config clang libclang-dev \
  libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev \
  libvulkan-dev mesa-vulkan-drivers libfontconfig-dev libfreetype-dev

See herdr-core for core installation.

Build and test

  • just build runs cargo build --locked.
  • just test runs the Bun mod tests and cargo test --locked.
  • just check runs the same tests as just test.

Change the app icon

The app icon identifies Canopy in the macOS Dock and Linux launcher. To change the artwork, export a square 1024 × 1024 PNG from Figma, update the three files in assets/icons/, and rebuild the package.

The macOS app bundle and disk image use Canopy.icns, which contains standard and Retina sizes. The Linux launcher uses canopy.svg, which embeds the PNG. The Windows executable embeds the sizes from canopy.ico at build time.

The development window

Warning: Never launch a bare debug binary against your daily app home or core.

  1. Build Canopy before you run scripts/dev.
  2. Run scripts/dev to open the development window.
  3. Close the development window before you run either development script again.
  4. Run scripts/dev-stop to stop only its reserved scratch core.

The scripts keep the app home, config, core socket and state under ${TMPDIR:-/tmp}/canopy-dev. Closing the window leaves the scratch core running. Run scripts/dev again to reattach with your layout and terminals.

Checks before a pull request

Follow CONTRIBUTING.md for contribution rules.

  1. Run just build.
  2. Run just test.
  3. Run just docs-check to check generated commands, CLI examples and wiki style.

just docs-generate regenerates Commands. Both documentation recipes build Canopy first.

Run scripts/core-check /absolute/path/to/hc to check a core without opening Canopy. It starts and stops a disposable core in scratch state.

On Linux, use scripts/sandbox up for a separate app home, core and display, then scripts/sandbox shot for a screenshot. Run scripts/sandbox down when you finish.

Windows checkouts

Canopy embeds text files byte for byte. .gitattributes requires LF line endings on every OS. For Windows clones made before that file existed, refresh the CRLF copies once.

Warning: Run this refresh only from a clean working tree.

git rm -r --cached -q . && git reset --hard

Clone this wiki locally