IT lexicon › Programming › Cargo

Cargo

Programming På svenska → Updated: 2026-11-13

Rust's package and build tool, and why Rust projects assemble themselves without external makefiles or shell scripts.

Cargo reads everything from `Cargo.toml` — dependencies, versions, metadata, build profiles. Commands like `cargo build`, `cargo test`, and `cargo run` do what they say, with no configure step or implicit search paths. Versions are locked in `Cargo.lock`, so two developers get identical transitive dependencies; `cargo update` brings in new versions reproducibly.

The package repository is crates.io. A maintainer publishes with `cargo publish` and the package is immediately available. Integration with Rust's toolchain is so tight that most developers never think about build steps — Cargo handles cross-compilation, compiler flags, and linking, often correctly without tweaking. It set the standard for what a modern build system should feel like.

← Back to the lexicon