cargo-run 0.6.0

A powerful, fast, and developer-friendly CLI tool for managing project scripts in Rust. Workspace-aware, cargo-script ready, with hooks, parallel execution, watch mode, and CI/CD templates.
Documentation
//! Multi-crate workspace template.

use super::{Template, TemplateFile};

const SCRIPTS_TOML: &str = r#"# Generated by `cargo script init --template workspace`
# Run cargo-run from the workspace root.

[global_env]
RUST_BACKTRACE = "1"

[workspace]
# When omitted, members are auto-discovered from Cargo.toml.
# members = ["crates/*"]
# exclude = ["crates/legacy"]

[scripts]
# Run a script across every workspace member, sequentially.
test-all      = { command = "cargo test", workspace = "all", info = "Test every member" }

# Same, but in parallel (requires the `parallel` feature).
test-parallel = { command = "cargo test", workspace = "parallel", info = "Test in parallel" }

# Workspace-wide checks at the root.
fmt-check     = "cargo fmt --all -- --check"
lint          = "cargo clippy --workspace --all-targets -- -D warnings"
doc           = "cargo doc --workspace --no-deps"

# Composite CI pipeline.
ci = { include = ["fmt-check", "lint", "test-all"], info = "Full workspace CI" }
"#;

pub const TEMPLATE: Template = Template {
    name: "workspace",
    description: "Multi-crate workspace setup with parallel test runs",
    files: &[TemplateFile { path: "Scripts.toml", contents: SCRIPTS_TOML }],
};