kata-ci is a half-day Rust workshop for developers who already know how to design software, but are still getting comfortable with Rust.
The main workshop starts at step 01.
Step 00 is optional pre-work for participants who want a focused Rust fundamentals warm-up before the CLI material begins.
The workshop teaches a specific CLI architecture progression:
- parse arguments with
clap - map parser output into a typed internal
Command - turn a
Commandinto aPlan - execute a
Planwith aRunner - support run, dry-run, and describe modes
- keep the design deterministic and easy to test
The domain is deliberately fake. kata-ci feels inspired by CI/CD tooling, but it never touches real tools, networks, registries, or deployment targets.
- Developers who are strong in general engineering
- Teams adopting Rust for internal tools or platform tooling
- Learners who want a practical example of separation of concerns in a CLI
- Learners who may want an ownership-and-
Resultrefresher before the main workshop
Main workshop:
- How to model a small but maintainable Rust CLI
- When to keep
claptypes at the edge of the system - How typed enums and structs improve clarity
- Why planning is a useful layer between intent and execution
- How dry-run and describe modes shape architecture
- How to write deterministic tests without real shell commands
Optional pre-work in step 00 also covers:
Stringvs&str- pass by value vs pass by reference
- mutable borrowing with
&mut Result,unwrap, and?
Recommended pre-work:
- 60-90 min: step 00, Rust basics, self-paced and optional
Approximate pacing for the live half-day workshop:
- 15 min: intro and repo orientation
- 25 min: step 1, CLI basics
- 25 min: step 2, typed command model
- 30 min: step 3, planner and plan
- 30 min: step 4, runner and dry-run
- 35 min: step 5, describe, config, and tests
- 20 min: debrief and Q&A
Requirements:
- stable Rust toolchain
cargo
Recommended checks:
rustc --version
cargo --versionslides/ live presentation material
labs/ participant lab instructions
exercises/ starter code for each step
solutions/ reference solution for each step
Each step is a separate crate so it can compile and run independently.
Step 00 is a library crate.
Steps 01 -> 05 are binary crates.
Optional pre-work:
slides/00-rust-basics.mdlabs/00-rust-basics.md
Main workshop flow:
slides/01-cli-basics.mdlabs/01-cli-basics.mdslides/02-command-model.mdlabs/02-command-model.mdslides/03-plan-and-steps.mdlabs/03-plan-and-steps.mdslides/04-runner-and-dry-run.mdlabs/04-runner-and-dry-run.mdslides/05-describe-config-and-tests.mdlabs/05-describe-config-and-tests.md
All commands below are run from the repository root.
Step 00, optional pre-work:
cargo test -p kata-ci-exercise-step-00Step 1:
cargo run -p kata-ci-exercise-step-01 -- --help
cargo test -p kata-ci-exercise-step-01Step 2:
cargo run -p kata-ci-exercise-step-02 -- verify
cargo test -p kata-ci-exercise-step-02Step 3:
cargo run -p kata-ci-exercise-step-03 -- build all
cargo test -p kata-ci-exercise-step-03Step 4:
cargo run -p kata-ci-exercise-step-04 -- --dry-run deploy sandbox
cargo test -p kata-ci-exercise-step-04Step 5:
cargo run -p kata-ci-exercise-step-05 -- --describe verify
cargo run -p kata-ci-exercise-step-05 -- --describe --format json build all
cargo test -p kata-ci-exercise-step-05All commands below are run from the repository root.
Step 00, optional pre-work:
cargo test -p kata-ci-solution-step-00Step 1:
cargo run -p kata-ci-solution-step-01 -- maven 3.9.6
cargo test -p kata-ci-solution-step-01Step 2:
cargo run -p kata-ci-solution-step-02 -- image build
cargo test -p kata-ci-solution-step-02Step 3:
cargo run -p kata-ci-solution-step-03 -- deploy sandbox
cargo test -p kata-ci-solution-step-03Step 4:
cargo run -p kata-ci-solution-step-04 -- --dry-run image publish
cargo test -p kata-ci-solution-step-04Step 5:
cargo run -p kata-ci-solution-step-05 -- --describe --format text verify
cargo run -p kata-ci-solution-step-05 -- --config solutions/step-05/kata-ci.toml build all
cargo test -p kata-ci-solution-step-05- Assign step
00ahead of time when the audience is new enough to Rust that ownership and error handling would otherwise slow down the live session. - Keep the lectures short and code-focused.
- Demo the solution crate only after participants have worked the exercise.
- Prefer discussing tradeoffs over Rust trivia.
- Re-anchor the group on the same three questions each step:
- What is the CLI edge?
- What is the internal model?
- What became easier to test after the refactor?
This workshop is intentionally about one narrow architectural story:
clapowns parsing- internal
Commandowns intent Plannerowns decompositionRunnerowns execution strategyDescriberowns rendering
Optional step 00 prepares the Rust language basics.
If you run 01 -> 05 in order, participants will see the same fake CLI evolve from a simple parser into a small, testable application.