"Drop your C files and it just works."
A Cargo-inspired, declarative build driver and workspace orchestrator designed to eliminate manual compilation headaches while not compromising absolute control over your repo.
C isn't a bad language. However, the tooling is tedious and old. C-Salt aims to solve this by providing a modern, Cargo-inspired build orchestrator. It operates on a compilation "unit", which allows for easy management of C projects at the start. However, it also doesn't force Salt.toml upon you if you don't want to use it, as C-Salt is a lightweight wrapper, not a replacement.
NOTE: we use .csalt/ as a cache for all of its tasks so far to keep your repo clean, but in the future, you will be able to adjust that.
# Salt.toml
[package]
name = "example"
version = "0.1.0"
authors = [""]
description = ""
[build]
build_sys = "cmake" # As of now, only cmake is supported
build_sys_ver = "3.15" # As of now, only ^3.15 is supported, and no ranges
build_dir = "build/"
edition = "c11"
compiler = "clang" # As of now, only gcc, clang, and zig are supported
[[unit]]
name = "example"
kind = "bin"
src = ["src/"] # First file (or first file in folder) is implied to be the main fileNOTE: C-Salt is a Minimum Viable Product (MVP) in this current stage. It is not ready for production use, will change heavily, has unfinished features, and is not battle-tested against every edge case, especially for cross-platform uses.
There are a few ways to get started with C-Salt:
Download the latest pre-release from the releases page.
If you have Cargo installed, you can install C-Salt directly from crates.io:
cargo install csaltIf you prefer to build from source, you can clone the repository and install it locally:
# Clone the repository from source (use any Git client, e.g. Git Bash, GitKraken, GitHub Desktop)
git clone https://github.com/Escapee-Organization/csalt-main.git
cd csalt-main
# Install the CLI via Cargo
cargo install --path .
# Verify installation
csalt --helpcsalt new <name>: Provisions a standardized C workspace complete withsrc/,include/,.gitignoreinstantly.--git: Auto-initializes a Git repository.--full: Populates placeholder directories forvendor/andtests/andREADME.md.--stealth: Stealth Mode. Removes configuration files from tracking so you can secretly manage massive legacy codebases with C-Salt without disrupting your team. Note: it is always wise to copy an existing C project into a new directory before using C-Salt.
csalt compile: Executes C-Salt as a build system, calling the compiler and linker inside the cache (.csalt/), and enforcing a strict, safe compilation order. Supportsbin,lib, anddynout of the box.csalt build: Automatically acts as a communicator to a build system, such as CMake 3.15. It has two modes:- Fresh Mode: Translates your linear
Salt.tomlstructure seamlessly into native, readableCMakeLists.txtscripts for CMake 3.15, compiling the workspace cleanly. - Managed Mode: Detects if you already have a custom, manual
CMakeLists.txtin your root, safely steps out of the way, and passes command execution downstream to trust your existing script.
- Fresh Mode: Translates your linear
- Raw Passthrough Escape Hatch: Pass trailing variable arguments directly to your underlying backend (
csalt (compile/build) -- [args]) to run raw commands. In other words, it's a macro for:-
csalt emit cd .csalt/ <command> [args] cd ..
-
- What are the kinds of
[[unit]]I can use?
- There are 5 basic kinds of
[[unit]]you can use: bin(binary, e.g.mainormain.exe)lib(static library, e.g.libmath.aormath.lib)dyn(dynamic library, e.g.libmath.dllorlibmath.so)extlib(pre-compiled static library path, e.g.libmath.aormath.lib)extdyn(pre-compiled dynamic library path, e.g.libmath.dllorlibmath.so)pkg(package, usually managed bypkg-config)- NOTE:
extdynanddynhave caused the original creator many issues, especially late at night for cross-platform uses, so they may not be complete
All architectural decisions were made by the original creator (BurningHot687). A large portion of the current codebase was generated using the Zed Auto-complete functionality and Gemini Flash.
- Current Status: Refactoring is underway to clean up AI-generated sections, optimize maintainability, and ensure long-term stability.
- Why AI?: This was the original creator's first Rust project, which started on 2026/6/7, and finished the summer MVP on 2026/7/10 (albeit not testing). The creator had only written simple "Hello World" programs in C and Rust before this project, so they had to actively learn Rust and C at the same time while working on this project. They used AI to speed up development, get working code quickly, and quickly learn how to use Rust, Git, and more. They also were able to learn enough to spot the mistakes in AI-generated code, which was common due to using a weak model.
See the ROADMAP file for details.
If you would like to contribute, please see the CONTRIBUTING file for details.
This project is licensed under the MPL 2.0 License. See the LICENSE file for details.