# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # Rust check, lint, and format tasks ["rust:check"] description = "Check all Rust crates for errors" run = "cargo check --workspace" hide = true ["rust:lint"] description = "Lint Rust code with Clippy (deny warnings)" run = [ "cargo clippy --workspace --all-targets -- -D warnings", "cargo clippy --manifest-path e2e/rust/Cargo.toml --all-targets -- -D warnings", ] hide = true ["rust:format"] description = "Format Rust code" run = "cargo fmt --all" hide = true ["rust:format:check"] description = "Check Rust formatting" run = "cargo fmt --all -- --check" hide = true ["rust:verify:telemetry-off"] description = "Verify telemetry emission code is compiled out with --no-default-features" run = [ # Positive control: the default (telemetry-on) gateway must contain the # markers, so the absent checks below can never become silently vacuous. "cargo build -p openshell-server --bin openshell-gateway", "tasks/scripts/verify-telemetry-compiled-out.sh present target/debug/openshell-gateway", # Guard: telemetry-free builds must contain no telemetry markers. The # gateway needs at least one compute driver to link, so build with a # single-driver feature set that excludes telemetry. "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-kubernetes,driver-docker,driver-podman,driver-vm", "tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-gateway", "cargo build -p openshell-sandbox --bin openshell-sandbox --no-default-features", "tasks/scripts/verify-telemetry-compiled-out.sh absent target/debug/openshell-sandbox", ] ["rust:verify:drivers-off"] description = "Verify each compute driver can be compiled out via per-driver cargo features" depends = [ # Positive control: the default build carries every driver's markers. "rust:verify:drivers-off:default-all", # Each single-driver build carries only that driver's markers. "rust:verify:drivers-off:kubernetes", "rust:verify:drivers-off:docker", "rust:verify:drivers-off:podman", "rust:verify:drivers-off:vm", # Mixed feature set: verifies driver features compose additively. "rust:verify:drivers-off:docker+podman", # Zero-driver build is a valid extension-only gateway shape. Asserts the # binary links, no built-in driver markers survived, and the extension-only # unit-test paths behind #[cfg(not(any(feature = "driver-*")))] execute. "rust:verify:drivers-off:none", ] ["rust:verify:drivers-off:default-all"] description = "Verify the default gateway build carries every driver's markers" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway", "tasks/scripts/verify-drivers-compiled-out.sh present all target/debug/openshell-gateway", ] ["rust:verify:drivers-off:kubernetes"] description = "Verify a --features driver-kubernetes gateway carries only the kubernetes marker" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-kubernetes", "tasks/scripts/verify-drivers-compiled-out.sh only kubernetes target/debug/openshell-gateway", ] ["rust:verify:drivers-off:docker"] description = "Verify a --features driver-docker gateway carries only the docker marker" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-docker", "tasks/scripts/verify-drivers-compiled-out.sh only docker target/debug/openshell-gateway", ] ["rust:verify:drivers-off:podman"] description = "Verify a --features driver-podman gateway carries only the podman marker" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-podman", "tasks/scripts/verify-drivers-compiled-out.sh only podman target/debug/openshell-gateway", ] ["rust:verify:drivers-off:vm"] description = "Verify a --features driver-vm gateway carries only the vm marker" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-vm", "tasks/scripts/verify-drivers-compiled-out.sh only vm target/debug/openshell-gateway", ] ["rust:verify:drivers-off:docker+podman"] description = "Verify a --features driver-docker,driver-podman gateway carries only those two markers" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features --features driver-docker,driver-podman", "tasks/scripts/verify-drivers-compiled-out.sh only docker,podman target/debug/openshell-gateway", ] ["rust:verify:drivers-off:none"] description = "Verify a --no-default-features gateway links, carries no driver markers, and runs the extension-only unit tests" hide = true run = [ "cargo build -p openshell-server --bin openshell-gateway --no-default-features", "tasks/scripts/verify-drivers-compiled-out.sh absent all target/debug/openshell-gateway", # The zero-driver profile gates the extension-only unit test paths; run # the library test suite under --no-default-features so those assertions # actually execute. "cargo test -p openshell-server --lib --no-default-features", ]