Browse the docs

Project

Building from source

Building Hangar needs Xcode 27.

The guest agents for macOS, Linux and Windows are written in Rust and live in their own repository, hangar-guest-agent. Clone it next to this one (../hangar-guest-agent, or set AGENT_DIR).

Tools

make builds the agents with the toolchain pinned in their rust-toolchain.toml. Install:

  • rustup
  • zig 0.17.0
  • cargo-zigbuild 0.24.0
  • cargo-audit 0.22.2
brew install zig
cargo install cargo-zigbuild --version 0.24.0 --locked
cargo install cargo-audit --version 0.22.2 --locked

Make targets

Command
make build VERSION=0.4.0 Build dist/Hangar.app
make dmg Package dist/Hangar.app as dist/Hangar.dmg
make test Run the tests
make dev Debug build in .build/xcode
make agents Check the agents' dependencies and build them into Resources/Guest
make format, make lint Format the Swift code with the toolchain's swift-format, or check it
make install, make uninstall Install to or remove from /Applications

The command line

To link the command line by hand:

sudo ln -sf /Applications/Hangar.app/Contents/Helpers/hangar /usr/local/bin/hangar