Craft: A Cargo-Like Build Tool for C and C++ Aims to Modernize Native Development
Craft: A Cargo-Like Build Tool for C/C++ That Could Change How We Build Native Software
A developer has built Craft, a build tool for C and C++ that aims to bring the developer experience of Rust Cargo to native languages. The Show HN post has gained 94 points and 83 comments on Hacker News.
What Is Cargo
For non-Rust developers, Cargo is Rust build system and package manager that provides:
- One command build: just works
- Dependency management: declares dependencies, Cargo handles fetching and compiling
- Test runner: runs all tests
- Publishing: shares libraries with the community
- Workspaces: Multi-project management with shared lockfiles
What Craft Does for C/C++
Craft brings similar capabilities to C and C++:
- Simple configuration: YAML or TOML-based project configuration instead of complex Makefiles or CMake
- Dependency management: Automatic fetching and building of libraries
- Cross-compilation: Built-in support for targeting multiple platforms
- Build caching: Incremental builds that only recompile what changed
- Testing integration: Run tests with a single command
The C/C++ Build Problem
Building C and C++ projects has historically been painful:
| Tool | Problem |
|---|---|
| Make | Complex syntax, manual dependency tracking |
| CMake | Verbose configuration, steep learning curve |
| Autotools | Ancient, platform-specific, slow |
| Bazel | Complex, designed for Google-scale |
| Meson | Better but still requires Ninja backend |
Community Discussion
The HN thread (83 comments) highlighted several perspectives:
Enthusiasm: Many C/C++ developers crave Cargo-like simplicity
Concerns: Fragmenting the C++ ecosystem with yet another build tool
Comparison with existing tools: Conan (package manager), vcpkg, Buck2, xmake
The real problem: C++ ABI compatibility makes dependency management fundamentally harder than Rust
Why This Matters
If Craft or similar tools succeed, they could:
- Lower the barrier to entry for C/C++ development
- Reduce build system complexity in large projects
- Enable easier cross-platform development
- Make open-source C/C++ libraries easier to consume
Source: HN Show HN / GitHub — 94 points, 83 comments