Installation
Supported Operating Systems
- Linux (GCC / Clang)
- macOS (Clang / Apple Clang)
- Windows (MSVC -
cl.exe/lib.exe; MinGW-w64 GCC with--target x86_64-w64-mingw32)
On Windows the default toolchain is MSVC. MinGW-w64 GCC is tested through --target x86_64-w64-mingw32; other GCC/Clang-style toolchains there are best-effort (see
toolchains.md for the dialect model, what is supported, and the
known limitations).
Install Methods
-
Prebuilt binary with cargo-binstall. With
cargo-binstallinstalled, run:cargo binstall cabinpkg
This uses Cabin’s GitHub release archives when a matching binary is available. The installed
command is cabin. The release archives ship no checksum files; each carries a GitHub artifact
attestation instead, which gh attestation verify <archive> --repo cabinpkg/cabin checks.
-
From crates.io source build. Cabin is published as the
cabinpkgpackage on crates.io. With a Rust toolchain (1.95 or newer) and a C compiler and archiver (see the INSTALL.md prerequisites) on$PATH, run:cargo install cabinpkg
The installed command is cabin.
- From a third-party package manager. Community-maintained packages - not provided or endorsed by the Cabin maintainers. Repology tracks downstream availability as it appears.
- From source. See INSTALL.md for the prerequisites and build steps. Use this when you need an unreleased revision or want to verify a build locally.
Runtime Requirements
cabin itself has no required runtime dependencies, but the subcommands that drive the C/C++
toolchain need the relevant tools installed on $PATH. Each tool only matters for the subcommand
it backs:
| Tool | Required by | Override |
|---|---|---|
C++ compiler - GCC/Clang (c++, clang++, g++) on Unix; MSVC (cl) on Windows | cabin build / cabin run / cabin test / cabin tidy when the selected targets contain C++ sources | CXX |
C compiler - GCC/Clang (cc, clang, gcc) on Unix; MSVC (cl) on Windows | the same commands when the selected targets contain .c sources | CC |
Static-library archiver - ar on Unix; lib on Windows | cabin build / cabin run / cabin test / cabin tidy / cabin metadata / cabin explain build-config | AR |
| Ninja (≥ 1.10) | cabin build / cabin run / cabin test | NINJA |
pkg-config | targets that declare system = true dependencies | CABIN_PKG_CONFIG |
clang-format | cabin fmt | CABIN_FMT |
run-clang-tidy | cabin tidy | CABIN_TIDY |
On Windows, Cabin defaults to the MSVC toolchain and auto-discovers it: if cl.exe /
lib.exe and the INCLUDE / LIB environment are not already present, Cabin locates the installed
Visual Studio toolchain (via the find-msvc-tools
crate) and supplies them for the build. A stock Visual Studio / Build Tools install therefore works
without a Developer Command Prompt. You may still run from a Developer Command Prompt or a
shell activated by vcvarsall.bat (or the
ilammy/msvc-dev-cmd GitHub Action) to pin a specific
toolset - Cabin uses an already-active environment as-is. cabin fmt and cabin tidy still shell
out to clang-format / run-clang-tidy from an LLVM install, exactly as on Unix.
cabin resolve, cabin update, cabin tree, and the graph-only cabin explain subcommands
(package, target, source, and feature) do not require a compiler, archiver, or Ninja.
The archiver and at least one compiler (C or C++) are resolved when Cabin renders or plans a build
configuration. Each compiler becomes required only when a build compiles sources of its language,
so a C-only project needs no C++ compiler. cabin metadata and cabin explain build-config report toolchain details, so they need
the required tool slots for that build configuration to be resolvable; their --version capability
probes are fail-soft after resolution succeeds. Ninja is only invoked by commands that run the
Ninja backend. See toolchains.md for compiler selection precedence and capability
detection.