Repository navigation
Releases
cx 1.0.0
The first release.
Added
-
cx init --from: import an existing build.--from CMakeLists.txt
and/or--from vcpkg.jsondraft the cx.toml: package, standard,
find_package/FetchContent/CPM/vendored and vcpkg dependencies with their
link targets (platform- and test-only ones in their sections), defines,
flags and[[bin]]s. Nothing is evaluated; what can't be translated is
printed and listed at the end of the cx.toml.--dry-runprints it instead.
(Importing an existing project) -
Example
15-popular-libraries: fmt, spdlog and nlohmann/json from git
(spdlog built against that fmt), Catch2 as a dev-dependency, Asio from vcpkg
and Qt 6 from the system, the last two behind the featuresnetandgui. -
Example
16-migrate-cmake: a CMake project with a vendored CMake
library, next to the cx.tomlcx init --from CMakeLists.txtdrafted from
it; the end-to-end tests check that the importer still drafts it. -
The cx Book works on phones. A new style (
docs/theme/): a readable text
column, code blocks that scroll sideways instead of breaking lines, tables
that scroll on their own, and below 768px a top bar whose buttons open the
chapters and the search box as a drawer. Light and dark schemes follow the
system. -
cx docworks likecargo doc. It documents the package and every cx
package it depends on intotarget/doc/<name>/, linked to each other
through Doxygen tag files, withtarget/doc/index.htmllisting them all.
The public API (include/) by default;--document-private-itemsadds
src/.--no-deps,--features,--locked; fresh packages are not
generated again. (Formatting, linting and documentation) -
Doxygen is a managed tool:
tools.doxygen/CX_DOXYGEN, downloaded
(1.18.0) when it isn't in PATH on Linux x86-64, macOS and Windows x64, and
bycx tools install. (External tools) -
Examples, as in Cargo:
cx run --exampleandcx run --binwithout a
name list what's available;cx build --example <NAME>(repeatable) builds
just those examples. (Commands) -
package.authorsas in uv:authors = [{ name = "...", email = "..." }],
with a name, an email or both, checked when the manifest is read
("Name <email>"strings still work).cx new/cx initfill it in from git
(--author-from auto|git|none), andcx metadatareports it. (cx.toml) -
Examples of foreign dependencies:
12-cmake-dependencies(fmt and
doctest from git),13-vcpkg-dependencies(fmt and zlib from vcpkg) and
14-configure-dependencies(an Autotools project). -
examples/: eleven small cx projects, one feature each, from a
single binary to workspaces, features, CMake interop, code generation,
shared libraries, platform-specific dependencies and modules. The
end-to-end tests build and run all of them. (examples/README.md) -
Releases and
cx self update. Taggingv<version>builds cx and
cx-registry for Linux (static, x86-64 and aarch64), macOS (Intel and Apple
silicon) and Windows, and publishes them withcx-release.toml(checksums,
signed onceCX_RELEASE_SIGNING_KEYis set),SHA256SUMS, build
provenance and install scripts (install.sh,install.ps1).
cx self update [VERSION]replaces the running cx after checking the
checksum, the signature and that the new cx runs;cx self versionshows
which cx this is.cx index signalso signs a single file. A static Linux
cx finds the system's CA certificates where the distribution keeps them.
(Installation) -
Dependencies with other build systems.
{ vcpkg = true }installs a
vcpkg port (vcpkg installin manifest mode, once per set of ports and
triplet) and finds it withfind_package(). Git and path dependencies with
aconfigurescript (orconfigure.ac) or anSConstructare built at
build time and linked as<name>::<name>;build-system,libsand
include-dirssay how.cx add --vcpkg/--build-system/--lib. New tools:
tools.pythonandtools.scons(downloaded when missing),tools.vcpkg,
tools.makeandtools.autoreconf(found only). (Dependencies) -
cx cache info|gc|cleanandcx clean --gc. cx records when it uses
each cache entry (<cache>/last-use.toml);gcremoves what wasn't used
for--max-age(default 90 days) or beyond--max-size, keeping what the
project's cx.lock needs.cache.auto-gc/CX_CACHE_AUTO_GCcleans up
automatically, at most once a day. (Build caches) -
Compressed package archives.
cx packagecompresses with cx's own
deterministic deflate encoder (about as small asgzip -6); archives stay
reproducible. (Publishing) -
cx check: syntax-only compiles (-fsyntax-only, MSVC/Zs) with a
build's exact flags, incremental through depfiles, with the same
diagnostics and JSON output ascx build. (Formatting, linting and docs) -
Language-standard-aware resolution. Index entries record each version's
languageandstandard; versions that need a newer standard than the
package uses are avoided ([resolver] incompatible-standards = "fallback",
the default), refused ("deny") or ignored ("allow");max-standard
raises the limit. (Dependencies) -
Build-dependencies.
[build-dependencies]are cx packages whose
binaries[[generate]]commands run as{bin:<package>/<binary>}. They are
locked like other dependencies, never linked, and built for the host when
cross-compiling (target/host/<profile>/).cx add --build.
(Code generation and build scripts) -
A shared artifact store.
build.artifact-store(a URL or directory)
shares the artifact cache: missing compiled dependencies are downloaded
after configuring, and withbuild.artifact-store-writenew ones are
uploaded. Entries carry SHA-256 checksums of their files and can be
Ed25519-signed (build.artifact-keys,build.artifact-signing-key).
(Build caches) -
Public and private dependencies.
public = trueon a dependency makes
it part of a library's interface; others are linked privately, so users of
the library don't get their headers. A dependency withoutpublicthat the
package'sinclude/headers include stays public, with a warning to say
so.cx add --publicwrites the key.
(Dependencies) -
Platform-specific dependencies.
[target.'cfg(...)'.dependencies]
(and.dev-dependencies, or a triple instead ofcfg(...)) withunix,
windows,target_os,target_arch,target_env,target_vendor,
target_family,all,anyandnot. They are chosen for the
--targettriple or the host;cx.lockcovers every platform. Index
entries carry them astarget = "cfg(...)".cx add --platformand
cx tree --target.
(Dependencies) -
Credential providers.
[registries.<name>] credential-providerand
[registry] global-credential-providers:cx:token(credentials.toml),
cx:keychain(macOS keychain, Windows Credential Manager, Secret
Service),cx:token-from-stdout <COMMAND>, or a helper program speaking a
small stdin protocol. Providers run only when a request needs a token.
cx login/cx logoutuse the registry's first provider.
(Configuration) -
cx-registry, a small registry server installed next tocx:
init,serve(static index files with ETags, plus the publish and yank
API, with every upload checked against itscx.tomland index files signed
again) andtoken add|list|remove(stored as SHA-256 hashes, with scopes
and package globs). (Publishing) -
A registry's
apiinconfig.tomlmay be relative to the index URL. -
Managed external tools. CMake, Ninja, clang-format and clang-tidy no
longer have to be installed. cx uses the ones inPATH, and downloads a
pinned release of any that's missing (or, for CMake, older than 3.25),
checked by SHA-256, into<cache>/tools/. On Windows, Ninja isn't
downloaded automatically.tools.<name>in config.toml (orCX_CMAKE,
CX_NINJA,CX_CLANG_FORMAT,CX_CLANG_TIDY) picks"auto",
"system","managed"or a program.tools.mirror/CX_TOOLS_MIRROR
downloads from a mirror.cx tools listshows what cx runs, and
cx tools installdownloads ahead of time.
(External tools) -
cortex is a cx package. The repository's
cx.tomllets a builtcx
build and test itself (cx build,cx test). The CMake build is unchanged
and stays the way to bootstrap cx. Both builds use the same pinned
dependencies (throughcmake/deps/) and read the version fromcx.toml.
(Installation) -
CI builds cortex with the
cxit just built, on Linux and macOS. -
Agent skills in
skills/teach Claude Code to use cx: project setup,
dependencies, migrating from CMake, publishing, CI and troubleshooting.
(skills/README.md) -
The README lists cx's features.
-
Toolchains and cross-compilation.
[toolchain](cc,cxx,
min-version) and[target.<triple>](cmake-toolchain-file,sysroot,
runner,cc,cxx), incx.tomlor the configuration files. Use
`--target <tr...