HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

cargo new — Create a new Cargo package. Equivalent of `cargo init`, but specifying a directory is required. More

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createcommandcargo newnewclicargopackageequivalent

Problem

How to use the cargo new command: Create a new Cargo package. Equivalent of cargo init, but specifying a directory is required. More information: <https://doc.rust-lang.org/cargo/commands/cargo-new.html>.

Solution

cargo new — Create a new Cargo package. Equivalent of cargo init, but specifying a directory is required. More information: <https://doc.rust-lang.org/cargo/commands/cargo-new.html>.

Create a new Rust project with a binary target:
cargo new {{path/to/directory}}

Code Snippets

Create a new Rust project with a binary target

cargo new {{path/to/directory}}

Context

tldr-pages: common/cargo new

Revisions (0)

No revisions yet.