[workspace] name = "coursebank" version = "0.0.0" authors = ["Scientific Computing Studio "] channels = ["conda-forge"] platforms = ["linux-64", "osx-arm64", "osx-64"] [environments] dev = ["dev"] docs = ["docs"] release = ["release"] [dependencies] rust = ">=1.96.0,<1.97" c-compiler = "*" pkg-config = "*" # --- Build and run --- [tasks.build] description = "Compile the release binary at target/release/coursebank" cmd = "cargo build --release" [tasks.debug] description = "Compile the debug binary" cmd = "cargo build" [tasks.build-lean] description = "Release build without the parquet feature" cmd = "cargo build --release --no-default-features" [tasks.install] description = "Install the coursebank binary onto your PATH" cmd = "cargo install --path . --locked" [tasks.clean] description = "Remove the target directory" cmd = "cargo clean" [tasks.cb] description = "Run the CLI, e.g., `pixi run cb validate -C path/to/course`" cmd = "cargo run --release --quiet --" # --- Quality gate --- [tasks.format] description = "Reformat the source in place" cmd = "cargo fmt --all" [tasks.fmt-check] description = "Fail if the source is not formatted; does not rewrite" cmd = "cargo fmt --all --check" [tasks.lint] description = "Run clippy with warnings treated as errors" cmd = "cargo clippy --all-targets -- -D warnings" [tasks.tests] description = "Run all tests: unit, integration, and doctests" cmd = "cargo test" [tasks.doctests] description = "Run only the documentation examples" cmd = "cargo test --doc" [tasks.check-docs] description = "Check that included markdown fences declare a language" cmd = "cargo test --test docs" [tasks.check] description = "Full verify-only gate: formatting, lint, tests, and doc build" depends-on = ["fmt-check", "lint", "tests", "doctests", "check-docs", "doc-build"] # --- Documentation --- [tasks.doc] description = "Build the API docs and open them in a browser" depends-on = ["check-docs"] cmd = "cargo doc --no-deps --open" [tasks.doc-build] description = "Build the API docs without opening a browser" depends-on = ["check-docs"] cmd = "cargo doc --no-deps" # --- Release packaging --- [tasks.setup-tools] description = "Install cargo-about, which the licenses task needs" cmd = "cargo install cargo-about --locked --features cli" [tasks.licenses] description = "Regenerate THIRD-PARTY-LICENSES.txt" cmd = "cargo about generate about.hbs -o THIRD-PARTY-LICENSES.txt" [tasks.dist] description = "Assemble a release bundle (binary and license notices) in dist/" cmd = "mkdir -p dist && cp target/release/coursebank dist/ && cp LICENSE.md THIRD-PARTY-LICENSES.txt dist/" depends-on = ["build", "licenses"] [feature.dev.dependencies] rust-analyzer = "*" lldb = "*" cargo-nextest = "*" [feature.dev.tasks.nextest] description = "Run the test suite with nextest" cmd = "cargo nextest run" [feature.docs.dependencies] typst = "*" [feature.docs.tasks.typeset] description = "Compile a .typ file to PDF" cmd = "typst compile" [feature.release.dependencies] bump-my-version = "*" [feature.release.tasks] bump = { cmd = "bump-my-version bump patch", description = "Cut the next release: rewrite the version in both manifests, commit, and tag" } bump-show = { cmd = "bump-my-version show-bump", description = "Preview the next version without changing anything" }