Migrating from Taskfile¶
Taskfile is a YAML-based task runner. must uses TOML and provides language-aware recipes.
Concept mapping¶
| Taskfile | must |
|---|---|
Taskfile.yml |
Mustfile.toml |
tasks: |
[recipe.<name>] sections |
cmds: |
script = "..." |
deps: |
deps = [...] |
env: |
[env] or recipe-level env |
sources: |
inputs |
generates: |
outputs |
status: |
Automatic via cache strategy |
dir: |
workdir |
task --list |
must list |
task --dry |
must --dry-run |
task --watch |
must watch |
Side-by-side¶
Taskfile.yml:
version: '3'
env:
OPT_LEVEL: "2"
tasks:
build:
cmds:
- cargo build --release -p my-app
sources:
- src/**/*.rs
generates:
- target/release/my-app
test:
deps: [build]
cmds:
- cargo test -p my-app
lint:
cmds:
- cargo clippy -- -D warnings
Mustfile.toml:
[project]
name = "my-app"
[env]
OPT_LEVEL = "2"
[recipe.build]
type = "rust-bin"
package = "my-app"
[recipe.test]
type = "rust-test"
package = "my-app"
deps = ["build"]
[recipe.lint]
type = "shell"
phony = true
script = "cargo clippy -- -D warnings"
Key differences¶
| Feature | Taskfile | must |
|---|---|---|
| Config format | YAML | TOML |
| Language awareness | No | 41 first-class recipe types |
| Caching | sources/generates with status check |
Automatic hash/mtime/never |
| Cross-compilation | Manual env vars | Target groups + auto toolchain |
| Parallel execution | Yes | Yes (DAG waves) |
| Plugins | No | Lua plugins |
Migration steps¶
- Convert YAML to TOML syntax
- Wrap each task in
[recipe.<name>] - Move
cmdstoscript(join multi-cmd with&&) - Move
depsdirectly - Replace
sources/generateswith appropriate cache strategy - Upgrade to first-class recipe types where possible