Refuse dependency resolution changes during CI.

Section: CI and environment debugging

Build with the lockfile enforced

bash
bash
cargo build --locked
Explanation

Useful when CI should use the committed lockfile exactly and fail if it would need updating.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing CI and environment debugging
Test with the lockfile enforced
Run tests without silently changing dependencies.
OpenIn sheetbashsame section
Build with frozen metadata
Disallow network access and lockfile changes.
OpenIn sheetbashsame section
Inspect Cargo configuration
Read resolved configuration values when available.
OpenIn sheetbashsame section
Print Rust-related environment variables
Inspect environment configuration in shells or CI jobs.
OpenIn sheetbashsame section
Inspect build-script output clearly
Use very verbose mode to surface build-script details.
OpenIn sheetbash1 tag match
Minimal build.rs rerun rule
Prevent unnecessary build-script reruns.
OpenIn sheetrust1 tag match