| Crates.io | compi |
| lib.rs | compi |
| version | 0.5.2 |
| created_at | 2025-06-02 21:31:21.263349+00 |
| updated_at | 2025-12-17 21:25:12.352097+00 |
| description | A build system written in Rust. |
| homepage | https://github.com/Allyedge/compi |
| repository | https://github.com/allyedge/compi |
| max_upload_size | |
| id | 1698398 |
| size | 76,000 |
A build system written in Rust.
cargo install compi
cargo install --git https://github.com/allyedge/compi
git clone https://github.com/allyedge/compi
cd compi
cargo install --path .
Download the latest binary for your platform from the GitHub Releases page.
wget https://github.com/allyedge/compi/releases/latest/download/compi-linux
chmod +x compi-linux
sudo mv compi-linux /usr/local/bin/compi
wget https://github.com/allyedge/compi/releases/latest/download/compi-macos
chmod +x compi-macos
sudo mv compi-macos /usr/local/bin/compi
Download the executable from the releases page and add it to your PATH.
| Flag | Description |
|---|---|
-f, --file <FILE> |
Configuration file (default: compi.toml) |
-j, --workers <N> |
Number of parallel workers (default: CPU cores) |
-t, --timeout <DURATION> |
Default timeout (e.g., "30s", "5m") |
--output <MODE> |
Output mode: group (default) or stream |
--dry-run |
Preview execution order without running tasks |
--rm |
Remove output files after successful execution |
-v, --verbose |
Enable verbose logging |
compi
compi build
compi -j 8 build
compi -t 5m test
compi --rm build
Create a compi.toml in your project root.
[config]
default = "build"
cache_dir = ".compi_cache"
workers = 4
default_timeout = "10m"
output = "group"
[variables]
TARGET = "target"
SRC = "src/**/*.rs"
FLAGS = "--release"
[task.prepare]
command = "mkdir -p ${TARGET}"
outputs = ["${TARGET}/"]
aliases = ["p"]
[task.build]
dependencies = ["prepare"]
command = "cargo build ${FLAGS}"
inputs = ["${SRC}", "Cargo.toml"]
outputs = ["${TARGET}/app"]
aliases = ["b"]
[task.test]
dependencies = ["build"]
command = "cargo test"
inputs = ["tests/**/*.rs"]
always_run = true
aliases = ["t"]
[task.clean]
command = "rm -rf ${TARGET}"
| Field | Type | Description |
|---|---|---|
command |
String | Required. Shell command to execute. |
dependencies |
[String] | List of task IDs that must complete first. |
inputs |
[String] | List of files/globs to track for changes. |
outputs |
[String] | List of files/globs this task produces. |
aliases |
[String] | Short names for CLI invocation (e.g. ["b"]). |
always_run |
Boolean | If true, ignore cache and always execute. |
auto_remove |
Boolean | If true, delete outputs after success (temp files). |
timeout |
String | Duration string (e.g. "30s") for this specific task. |
Compi uses a local cache (compi_cache.json) to skip tasks that are up-to-date.
A task is SKIPPED if:
outputs exist.inputs content hash matches the previous run.inputs modification times are older than the outputs.A task RUNS if:
inputs defined.always_run is set to true.--rm flag: Deletes files listed in outputs after the task succeeds.auto_remove = true: Acts like --rm is always passed for that specific task.