Skip to content

Releases

cx 1.0.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 17:10

The first release.

Added

  • cx init --from: import an existing build. --from CMakeLists.txt
    and/or --from vcpkg.json draft 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-run prints 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 features net and gui.

  • Example 16-migrate-cmake: a CMake project with a vendored CMake
    library, next to the cx.toml cx init --from CMakeLists.txt drafted 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 doc works like cargo doc. It documents the package and every cx
    package it depends on into target/doc/<name>/, linked to each other
    through Doxygen tag files, with target/doc/index.html listing them all.
    The public API (include/) by default; --document-private-items adds
    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
    by cx tools install. (External tools)

  • Examples, as in Cargo: cx run --example and cx run --bin without a
    name list what's available; cx build --example <NAME> (repeatable) builds
    just those examples. (Commands)

  • package.authors as 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 init fill it in from git
    (--author-from auto|git|none), and cx metadata reports 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. Tagging v<version> builds cx and
    cx-registry for Linux (static, x86-64 and aarch64), macOS (Intel and Apple
    silicon) and Windows, and publishes them with cx-release.toml (checksums,
    signed once CX_RELEASE_SIGNING_KEY is 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 version shows
    which cx this is. cx index sign also 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 install in manifest mode, once per set of ports and
    triplet) and finds it with find_package(). Git and path dependencies with
    a configure script (or configure.ac) or an SConstruct are built at
    build time and linked as <name>::<name>; build-system, libs and
    include-dirs say how. cx add --vcpkg/--build-system/--lib. New tools:
    tools.python and tools.scons (downloaded when missing), tools.vcpkg,
    tools.make and tools.autoreconf (found only). (Dependencies)

  • cx cache info|gc|clean and cx clean --gc. cx records when it uses
    each cache entry (<cache>/last-use.toml); gc removes 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_GC cleans up
    automatically, at most once a day. (Build caches)

  • Compressed package archives. cx package compresses with cx's own
    deterministic deflate encoder (about as small as gzip -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 as cx build. (Formatting, linting and docs)

  • Language-standard-aware resolution. Index entries record each version's
    language and standard; 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 with build.artifact-store-write new 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 = true on 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 without public that the
    package's include/ headers include stays public, with a warning to say
    so. cx add --public writes the key.
    (Dependencies)

  • Platform-specific dependencies. [target.'cfg(...)'.dependencies]
    (and .dev-dependencies, or a triple instead of cfg(...)) with unix,
    windows, target_os, target_arch, target_env, target_vendor,
    target_family, all, any and not. They are chosen for the
    --target triple or the host; cx.lock covers every platform. Index
    entries carry them as target = "cfg(...)". cx add --platform and
    cx tree --target.
    (Dependencies)

  • Credential providers. [registries.<name>] credential-provider and
    [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 logout use the registry's first provider.
    (Configuration)

  • cx-registry, a small registry server installed next to cx:
    init, serve (static index files with ETags, plus the publish and yank
    API, with every upload checked against its cx.toml and index files signed
    again) and token add|list|remove (stored as SHA-256 hashes, with scopes
    and package globs). (Publishing)

  • A registry's api in config.toml may 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 in PATH, 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 (or CX_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 list shows what cx runs, and
    cx tools install downloads ahead of time.
    (External tools)

  • cortex is a cx package. The repository's cx.toml lets a built cx
    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 (through cmake/deps/) and read the version from cx.toml.
    (Installation)

  • CI builds cortex with the cx it 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), in cx.toml or the configuration files. Use
    `--target <tr...

Read more