cx is a package manager and build tool for C and C++, in the spirit of Cargo and uv. You describe a package in cx.toml, and cx does the rest:
- Resolves dependencies: picks one version of every package with PubGrub, and explains in plain language when no combination works.
- Fetches sources: from a registry, git or a local path, and records exactly what it used in cx.lock.
- Generates and drives a CMake build: your package and all of its dependencies are built together, and cx writes the CMake for you.
$ cx new hello
Created binary (application) `hello` package
$ cd hello
$ cx run
Compiling hello v0.1.0 (/home/me/hello)
Finished `debug` profile [unoptimized + debuginfo] in 1.08s
Running `target/debug/hello`
Hello, world!
Dependencies can be plain CMake projects as well as cx packages. That means the existing C and C++ ecosystem is usable from day one.
Where to go next
Contents
Guide
Reference
Status
cx is early work and runs on Linux and macOS. These are not implemented yet:
- cx publish, a registry server, and a configuration file for registries
- Windows support
- workspaces, profiles beyond debug and release, and installing or packaging binaries