Cabin Docs

Cabin is a Cargo-inspired package manager and build system for C and C++. It treats C and C++ as first-class siblings: a single project can mix .c and .cc translation units, the C and C++ standards stay separate, CC and CXX are kept independent, and the resolved build configuration gets a deterministic fingerprint.

Cabin is Cargo-inspired, not Cargo-compatible: it borrows Cargo's vocabulary where the semantics line up and deliberately diverges where C/C++ semantics demand it. See Cargo-inspired interface for the full audit.

Where to start

If you are new to Cabin, the following pages cover the most common surfaces:

Reference by topic

Manifest and configuration

Targets and building

Dependencies

Workspaces and observability

Distribution and registry interface

Quickstart

# 1. Create a fresh single-package project.
cabin new hello
cd hello

# 2. Build it.
cabin build

# 3. Run it. Forward args after `--`.
cabin run -- world

# 4. Inspect the resolved state.
cabin metadata
cabin tree
cabin explain package hello

A minimal cabin.toml:

[package]
name = "hello"
version = "0.1.0"

[target.hello]
type = "cpp_executable"
sources = ["src/main.cc"]

A two-package workspace:

# cabin.toml at the workspace root
[workspace]
members = ["app", "lib"]
# app/cabin.toml
[package]
name = "app"
version = "0.1.0"

[dependencies]
lib = { path = "../lib" }

[target.app]
type = "cpp_executable"
sources = ["src/main.cc"]
# lib/cabin.toml
[package]
name = "lib"
version = "0.1.0"

[target.lib]
type = "cpp_library"
sources = ["src/lib.cc"]