An extension pack for using medic with Rust projects.
brew tap synchronal/tap
brew install medic-ext-rustExample Brewfile:
tap 'synchronal/tap'
brew 'synchronal/tap/medic'
brew 'synchronal/tap/medic-ext-rust'[doctor]
checks = [
{ check = "asdf", command = "plugin-installed", args = { plugin = "rust" } },
{ check = "asdf", command = "package-installed", args = { plugin = "rust" } },
{ check = "homebrew" },
{ name = "compile", shell = "cargo build --workspace" },
{ check = "rust", command = "crate-installed", args = { name = "cargo-audit" } },
{ check = "rust", command = "crate-installed", args = { name = "cargo-outdated" } },
{ check = "rust", command = "target-installed", args = { target = "aarch64-apple-darwin" } },
{ check = "rust", command = "target-installed", args = { target = "x86_64-apple-darwin" } },
]
[test]
checks = [
{ name = "Check for warnings", shell = "cargo build --workspace --features strict" },
{ step = "rust", command = "test", verbose = true },
]
[audit]
checks = [
## allow failure: chrono and time have known potential segfaults
{ name = "Audit crates", shell = "cargo audit", allow_failure = true, verbose = true },
{ check = "rust", command = "format-check" },
{ step = "rust", command = "clippy" },
]
[outdated]
checks = [
{ check = "rust" },
{ check = "rust", cd: "crates/my-workspace-crate" },
]
[update]
steps = [
{ step = "git", command = "pull" },
{ doctor = {} },
]
[shipit]
steps = [
{ audit = {} },
{ update = {} },
{ test = {} },
{ name = "Release", shell = ".medic/bin/release", verbose = true },
{ step = "git", command = "push" },
{ step = "github", command = "link-to-actions", verbose = true },
]Check out the release script for an example of packaging a Rust project for GitHub releases.
Checks for whether a Rust project is configured and/or ready to ship.
Is a given crate installed into the current Rust toolchain?
medic-check-rust crate-installed --name <name>
medic-check-rust crate-installed --name cargo-auditIs the project properly formatted?
medic-check-rust format-checkIs the given compilation target installed in the current Rust toolchain?
medic-check-rust target-installed --target <target>
medic-check-rust target-installed --target aarch64-apple-darwinCheck for outdated crates.
Steps for verifying the project is ready to ship.
Run the Rust linter.
medic-step-rust clippyRun all tests.
medic-step-rust test