Rusty Forge
As a student-developer primarily working in C, I was genuinely delighted when I started learning Rust and discovered Cargo. Coming from a background of Makefiles and CMakeLists, Cargo felt refreshingly simple and intuitive.
My very first thought was:
“Why don’t we have this for C?”
I built RustyForge – a minimal, fast, and cross-platform build system for C projects. It brings modern features, like TOML-based configuration, so you can get started with zero boilerplate, using rustyforge init
and rustyforge discover
.
Why RustyForge?
Most C projects use Make, CMake or other build systems that lack flexibility and ease of use.
RustyForge on the other hand uses:
- Easy TOML-Configuration
- Hash-based caching, for fast builds
- Parallel compilation for full CPU utilization
- Cross platform support – Windows and linux (macOS support is planned)
- Modern toolchain support, with gcc and clang (MSCV support planned)
Core-Features
- Parsing the RustyForge.toml for configurations
- Checking hashes for .c files and header dependencies
- Compiling .c files to .o files, with correct include paths
- Parallel compilation for optimal performance
- Linking object files to binaries and libraries (shared and static)
- Linking shared and static libraries into your binary
- Compiler configuration (gcc/clang)
How to use RustyForge
cargo install rustyforge
rustyforge init
rustyforge discover
rustyforge run
Discover
The discover
subcommand, scans the current working directory for .c
files and include directories. It then prompts you to add them to your RustyForge.toml
configuration.
You can customize its behaviour with the following flags:
-
--auto
: Automatically add all discovered files without prompting -
--ignore
: Exclude files or directories based on glob patterns
This makes setting up a project with existing files effortless – no need to manually list every source or include path.
Other example commands
rustyforge build --verbose
rustyforge rebuild --compiler=clang
rustyforge clean
Use rustyforge --help
or -h
for a more in depth usage.
What’s next
I’m planning more features like:
- Test-targets and automatic test execution
- Cross-compilation
- MSVC-support for Windows
- A CLion plugin for IDE integration
Give it a try!
If you work with C and are tired of managing Make files, give RustyForge a try!
RustyForge is Open Source and available on crates.io. Have a look at the source code on: github rustyforge
I’d love your feedback, contributions, ideas, or bug reports!
Thanks for taking a look!