talira

The Rust package manager

open sourceMIT OR Apache-2.0self-hostablefree

Cargo is Rust's package manager and build tool, installed with the Rust toolchain. It downloads a package's dependencies from crates.io (or Git, paths and other registries), resolves versions into a Cargo.lock, compiles the package, and builds, tests, benchmarks, documents, runs and publishes it with commands such as cargo build, cargo test, cargo doc and cargo publish. Cargo.toml manifests declare dependencies, optional features, build profiles and targets; workspaces manage several crates together; build scripts compile native code; and anyone can add subcommands by installing a cargo-<name> binary with cargo install. It's dual-licensed MIT or Apache-2.0.

Problems it solves

  • add a Rust library from crates.io to my project and keep its version locked
  • build, test and run a Rust project with one tool
  • manage several Rust crates in one repository with shared dependencies
  • publish my Rust library to crates.io
  • install a Rust command line tool from crates.io
  • turn optional functionality of my crate on and off with feature flags
  • compile C code or generate code before building my Rust crate
  • host a private registry for my company's Rust crates

Features

  • Cargo.toml manifest and Cargo.lock lockfile
  • dependencies from crates.io, Git, paths and alternative registries
  • build, check, test, bench, doc, run, publish and install commands
  • workspaces
  • features for optional functionality
  • build profiles and configuration
  • build scripts
  • custom subcommands as cargo-<name> binaries
  • registry authentication, credential providers and a protocol for running your own registry
  • lints and build timing reports

Capabilities

Has a command line toolplan not known
Takes pluginsplan not known

Alternatives

The same job

These do what Cargo does.

  1. npm The package manager for JavaScript

Compare Cargo with the top 3