cargo

cargo

TLDR

Search for crates

$ cargo search [search_string]
copy

Install a crate

$ cargo install [crate_name]
copy

List installed crates

$ cargo install --list
copy

Create a new binary or library Rust project in the current directory

$ cargo init --[bin|lib]
copy

Create a new binary or library Rust project in the specified directory

$ cargo new [path/to/directory] --[bin|lib]
copy

Build the Rust project in the current directory

$ cargo build
copy

Build using a specific number of threads (default is the number of CPU cores)

$ cargo build -j [jobs]
copy

Copied to clipboard
free 100$ digital ocean credit