cargo
cargo install
Build and install an executable target into a chosen installation root. Use a disposable root for this exercise so existing applications are not overwritten. A library-only package is not an installable CLI. Example format: shell. Run only in a disposable copy of v17/fixtures/projects/distribution-demo. Expected result (not executed): An executable named bytemind-distribution-demo is installed under lab-install/bin (with .exe on Windows). Common mistake: Confusing installation of a CLI with adding a library dependency.
Formal Syntax & Structure
rust syntaxrust
cargo install --path PATH [OPTIONS]Working Example
Example Snippetrust
cargo install --offline --path . --root ./lab-install