Cargo for C/C++? Meet Craft, a lightweight build tool that generates CMake for you

C and C++ developers know the drill: endless CMake fiddling, brittle find_package calls, and dependency spreadsheets. Craft aims to change that. The GitHub project bills itself as “think Cargo, but for C/C++” and it has been reported that early users on Hacker News praised how a single craft.toml can replace a pile of manual wiring. Relief, finally. Who hasn’t wanted fewer moving parts when all you really want is to build and run?
How Craft works — simple, pragmatic, familiar
Craft reads a small craft.toml, generates a CMakeLists.txt, fetches git dependencies automatically, and then invokes CMake behind the scenes. Commands are straightforward: craft project to scaffold, craft add to pull in libraries (git, path, or tag), craft build to compile, and craft run to execute. Templates are supported too — save a project as a template and bootstrap a new one in seconds. Installation is a one-liner curl or PowerShell script; requirements are just git and cmake. Clever escape hatches exist (CMakeLists.extra.cmake) for the messy edge cases.
Why this matters (and where it won’t magically help)
This isn’t a magical replacement for build-system complexity — Craft still leans on CMake and git under the hood — but it does remove friction for common workflows: scaffolding, dependency management, and keeping CMake boilerplate out of your face. For teams tired of copy-pasting find_package blocks or juggling submodules, Craft offers a modern CLI-driven UX in line with trends set by Cargo, npm, and other package managers. That emotional payoff — less busywork, more coffee — is the story here.
Adoption, of course, will depend on real-world edge cases: big mono-repos, platform-specific toolchains, and legacy CMake hairballs. If you’re curious, try the quick start: craft project my_app; craft add --git
Sources: github.com/randerson112, Hacker News
Comments