Your first project
Scaffold a crate, fetch dependencies, build, and run tests with rusty.
This walkthrough assumes you completed Installation: a toolchain is installed, env use is set, and $RUSTY_HOME/bin is on PATH.
Scaffold a project
rusty init creates a new package. On a TTY it prompts for name, app kind, manifest format, and edition; flags skip the prompts.
rusty init demo --kind lib --format rusty --edition 2021
cd demoKinds: web, cli, tui, lib, fullstack, or blank.
Formats:
| Format | Manifest | Lockfile |
|---|---|---|
rusty | rusty.json | rusty.lock |
cargo | Cargo.toml | Cargo.lock |
If you run rusty init inside a directory that already has Cargo.toml, rusty offers to migrate instead of creating a duplicate project.
Resolve and fetch
Generate or refresh the lockfile, then ingest dependencies into the content store:
rusty lock
rusty fetchfetch resolves versions (if needed) and prepares crate sources in the CAS. Re-running it is safe — already-ingested blobs are skipped.
Build
rusty buildFor rusty.json projects, rusty uses its native build driver when the project shape is supported. Otherwise it falls through to cargo with rusty-managed environment variables (CARGO_HOME, CARGO_TARGET_DIR, RUSTC_WRAPPER, etc.).
Release builds:
rusty build --releaseTest
rusty test always uses the native file-test runner — it never shells out to cargo test.
rusty test
rusty test -p demoIn a workspace with multiple packages, pass -p <name> or --workspace explicitly.
Run
rusty runBinary crates run through the same driver/cargo passthrough path as build.
Add a dependency
rusty add serde --vers ^1
rusty lock
rusty fetchNative add works on rusty.json manifests. Cargo-format projects use cargo-compatible passthrough.
What landed on disk
| Path | Purpose |
|---|---|
rusty.json / Cargo.toml | Package manifest |
rusty.lock / Cargo.lock | Resolved dependency graph |
.rusty/ | Project cache root (layers, target, lock digest, graph index) |
~/.rusty/store/ | Global content-addressable blobs and crate tarballs |
~/.rusty/cache/ | Global artifact cache keyed by layer digests |
See Project layout for the full tree.
Next steps
- Concepts overview — how store, layers, and workspace fit together
- Monorepo workflows — affected sets and CI test plans