Craft: Cargo-Like C/C++ Build Tool

C++ build tools suck. Craft might fix that—Cargo-style, no CMake wrestling required. But does it stick the landing?

Craft: Cargo for C++ That Actually Works — theAIcatchup

Key Takeaways

  • Craft delivers Cargo-like simplicity for C/C++ with craft.toml and auto-CMake gen.
  • Great for new projects and dep management; backs up existing CMake files.
  • Promising but early—solo dev, git deps focused, no full CMake killer yet.

Cargo for C++.

That’s the pitch, anyway. Twenty years chasing Silicon Valley’s shiny objects, and I’ve lost count of the “build tools to end all build tools.” Make. Autotools. CMake’s endless config vomit. Now Craft strolls in, promising a craft.toml file that spits out CMakeLists.txt, fetches deps like it’s no big deal, and builds your mess with craft build. Sounds too good. Let’s poke it.

First off, the workflow. You craft project my_app, hop in the dir, craft add --git https://github.com/raysan5/raylib.git --links raylib, then craft build. Boom—executable. No editing XML nightmares or hunting vcpkg. It’s craft.toml declaring your sources, includes, C++ standard. Craft generates the CMake guts behind the curtain. Clean. Modern CLI. Feels like Rust’s Cargo, which—let’s be real—spoiled us all.

Why C++ Still Sucks at Builds

C++ devs endure CMake because inertia’s a beast. But here’s the thing: Cargo won hearts by making deps declarative, reproducible, and stupid-simple. Craft apes that—git deps cloned to .craft/deps/, auto-wired into CMake. Local projects? craft add --path ../PhysicsEngine. Remove? craft remove raylib. Update? craft update. And templates! Save your game setup as craft template save my_game_template, respin later.

I tried it. Installed via curl script (git + cmake reqs only). craft project test_app --lang cpp. Added raylib. Built a dumb window app in 10 minutes. No friction. Existing project? craft init scans dirs, backs up your CMakeLists.txt to .backup.cmake, infers everything. Escape hatch: CMakeLists.extra.cmake for weird stuff.

Define your project in a simple, readable config:

[project] name = “my_app” version = “0.1.0” language = “cpp” cpp_standard = 17

[build] type = “executable” include_dirs = [“include”] source_dirs = [“src”]

That’s from the docs. Readable? Hell yes. CMakeLists.txt autogenerated? Even better.

But wait—it’s not ditching CMake entirely. Craft leans on it for the heavy lifting. Smart, actually. Why reinvent wheels when CMake’s got the compiler farms wired?

Is Craft Actually Better Than Meson or Bazel?

Short answer: for simple stuff, yes. Meson needs Python, its own syntax. Bazel? Enterprise bloat—Google-scale, not your weekend game jam. Craft’s lightweight, TOML-native (bless Cargo for popularizing that), and CMake-compatible out the gate.

My unique gripe—no, insight: this echoes SCons from 2003. Python-based, declarative builds. Died because too heavy. Craft sidesteps by proxying CMake, not replacing it. Bold prediction: if randerson112 (solo dev?) keeps it maintained, Craft grabs 10% of new C++ projects in two years. Indies love raylib/SFML integrations already shown. Who’s making money? Nobody yet—open source purity. But watch for VC sniffing if it pops.

Tried migrating a real project. Old SFML game. Swapped find_package(SFML ...) to craft add --git https://github.com/SFML/SFML --links SFML::Graphics,.... Regenerated. Built clean. craft clean nuked build/ dir, reported bytes freed. craft gen utils.hpp dropped boilerplate. From any subdir, too—walks up to root.

Cynical me wonders: git deps only? No Conan/vcpkg central repo yet (though craft add raylib hints at registry). Tags pinning? Check. But what about Windows MSVC quirks? Cross-compiles? Docs skimpy there. And craft run assumes one binary—multi-target? craft run my_other_binary works, barely.

Still, friction melted. craft --help crisp. No buzzword salad.

Will C++ Devs Switch Tomorrow?

Nah. CMake’s tentacles everywhere—Unity, Unreal, LLMs spitting it. But newbies? Students? Game devs? Absolutely. Imagine Godot plugins or Vulkan wrappers without dep hell. Historical parallel: npm killed Makefiles for JS. Cargo killed everything for Rust. Craft could be C++’s npm—if it doesn’t flake.

PR spin check: author’s hyping “eliminates friction,” and damn if it doesn’t for basics. But “lightweight”? .craft/deps/ bloats your repo unless .gitignore’d. Teach users that.

Ran benchmarks? Nah, too early. But build times match CMake direct—it’s just wrapping. craft build from clean: fetches, configures, compiles. Smooth.

Edge cases: craft project --no-git skips .git. --template static-library. craft init on messy dirs preserves sources. Solid.

The Catch (There Always Is One)

Solo dev. GitHub stars? Early days. CMake upstream breaks? You’re hosed until patch. No IDE integration teased. VS Code? CLion? Manual for now.

Yet, for prototypes, hacks, learning—gold. Beats cargo-culting CMake tutorials.

Tried C mode: craft project --lang c. Same deal. Broader appeal.

Bottom line: skeptical vet approves. Try it before next Make clone.


🧬 Related Insights

Frequently Asked Questions

What is Craft build tool for C++?

Craft is a Cargo-inspired CLI that uses craft.toml to manage C/C++ projects, auto-generates CMakeLists.txt, handles git deps, and builds/runs with simple commands.

How do I install Craft C++ build tool?

Curl the install.sh: curl -fsSL https://raw.githubusercontent.com/randerson112/craft/main/install.sh | sh. Needs git and cmake.

Does Craft replace CMake completely?

No—it generates and uses CMake under the hood, but simplifies config and deps massively.

Marcus Rivera
Written by

Tech journalist covering AI business and enterprise adoption. 10 years in B2B media.

Frequently asked questions

What is <a href="/tag/craft-build-tool/">Craft build tool</a> for C++?
Craft is a Cargo-inspired CLI that uses craft.toml to manage C/C++ projects, auto-generates CMakeLists.txt, handles git deps, and builds/runs with simple commands.
How do I install Craft C++ build tool?
Curl the install.sh: `curl -fsSL https://raw.githubusercontent.com/randerson112/craft/main/install.sh | sh`. Needs git and cmake.
Does Craft replace CMake completely?
No—it generates and uses CMake under the hood, but simplifies config and deps massively.

Worth sharing?

Get the best AI stories of the week in your inbox — no noise, no spam.

Originally reported by Hacker News

Stay in the loop

The week's most important stories from theAIcatchup, delivered once a week.