# Use cargo-make to run tasks here: https://crates.io/crates/cargo-make [config] skip_core_tasks = true default_to_workspace = false [env] CARGO_BUILD_WARNINGS = "deny" # Make per-member iterations inherit this Makefile so workspace tasks can be # defined here without needing a per-crate Makefile.toml. CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true # Workspace members to exclude when setting `workspace = true` for a task. # Must live at global env (not task-level) so it's read before workspace iteration # is generated. Only the `check-external-types` task uses this. CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = ["iroh/bench"] [tasks.default] alias = "dev-flow" [tasks.dev-flow] description = "Fast local sub-set of all CI checks" dependencies = [ "format-check", "check", "clippy", "doc", "test", ] [tasks.format] description = "Format the rust files following style rules" command = "cargo" args = [ "fmt", "--all", "--", "--config", "unstable_features=true", "--config", "imports_granularity=Crate,group_imports=StdExternalCrate,reorder_imports=true,format_code_in_doc_comments=true", ] [tasks.format-check] description = "Check the rust files for formatting style" command = "cargo" args = [ "fmt", "--all", "--check", "--", "--config", "unstable_features=true", "--config", "imports_granularity=Crate,group_imports=StdExternalCrate,reorder_imports=true,format_code_in_doc_comments=true", ] [tasks.check] description = "Run cargo-check for entire project" # Allows us to use CARGO_BUILD_WARNINGS instead of # RUSTFLAGS=-Dwarnings which breaks the build cache. toolchain = { channel = "stable", min_version = "1.97.0" } command = "cargo" args = ["check", "--workspace", "--all-features", "--all-targets"] [tasks.clippy] description = "Run cargo-clippy for entire project" # Allows us to use CARGO_BUILD_WARNINGS instead of # RUSTFLAGS=-Dwarnings which breaks the build cache. toolchain = { channel = "stable", min_version = "1.97.0" } command = "cargo" args = ["clippy", "--workspace", "--all-features", "--all-targets"] [tasks.doc] description = "Check the documentation build" # Allows us to use CARGO_BUILD_WARNINGS instead of # RUSTDOCFLAGS=-Dwarnings which breaks the build cache. toolchain = { channel = "stable", min_version = "1.97.0" } command = "cargo" args = ["doc", "--workspace", "--all-features", "--no-deps", "--document-private-items"] [tasks.test] description = "Run unit tests" command = "cargo" args = [ "nextest", "run", "--workspace", "--all-features", "--lib", "--bins", "--tests", "--no-fail-fast", ] [tasks.patchbay] description = "Run tests against real NAT scenarios" command = "cargo" args = ["nextest", "run", "--locked", "-p", "iroh", "-p", "iroh-dns-server", "--features", "iroh/qlog", "--test", "patchbay", "--profile", "patchbay", "${@}"] [tasks.check-external-types] description = "Run cargo check-external-types on workspace crates" workspace = true # cargo check-external-types needs a specific nightly toolchain, # see https://github.com/awslabs/cargo-check-external-types#how-to-use toolchain = "${TOOLCHAIN:nightly-2026-03-20}" command = "cargo" install_crate = false args = ["check-external-types", "--all-features"]