From a0a7ced9b46b804c1d0b14b6b4666c62a648a3c9 Mon Sep 17 00:00:00 2001 From: Thomas Sullivan Date: Tue, 6 Aug 2019 08:28:53 -0500 Subject: [PATCH] synced cargo and _rust/Cargo --- sheets/_rust/Cargo | 30 +++++++++++++++++++++--------- sheets/cargo | 13 ++++++++++--- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/sheets/_rust/Cargo b/sheets/_rust/Cargo index 5128f1b..92a35af 100644 --- a/sheets/_rust/Cargo +++ b/sheets/_rust/Cargo @@ -1,18 +1,30 @@ -// Using the Cargo package manager -// See also: https://doc.rust-lang.org/cargo/ +# Cargo is the Rust package manager +# Cargo downloads your Rust project's dependencies, +# compiles your project, makes packages, and upload them to crates.io +# See also: https://doc.rust-lang.org/cargo/ -// Create a new package with Cargo -cargo new hello_world +# To start a new project +cargo new hello_world --bin # program +cargo new hello_world --lib # library -// Build a package with Cargo +# Build a project without optimizations (in debug mode) cargo build -// Build and run a package with Cargo +# Build a project with optimizations turned on +cargo build --release + +# Build and run (without optimizations) a package with Cargo cargo run -// Build a package with Cargo for release -cargo build --release +# Updates dependencies in Cargo.lock +cargo update # update all +cargo update -p rand # updates just “rand” crate + +# run the project tests (from src/ and tests/) +cargo test -// Clean all output build files and targets +# Clean all output build files and targets cargo clean +# search for a package +cargo search diff --git a/sheets/cargo b/sheets/cargo index 1b61521..92a35af 100644 --- a/sheets/cargo +++ b/sheets/cargo @@ -1,23 +1,30 @@ # Cargo is the Rust package manager # Cargo downloads your Rust project's dependencies, # compiles your project, makes packages, and upload them to crates.io +# See also: https://doc.rust-lang.org/cargo/ -# To start a new project +# To start a new project cargo new hello_world --bin # program cargo new hello_world --lib # library -# Build a project +# Build a project without optimizations (in debug mode) cargo build # Build a project with optimizations turned on cargo build --release +# Build and run (without optimizations) a package with Cargo +cargo run + # Updates dependencies in Cargo.lock cargo update # update all -cargo update -p rand # updates just “rand” +cargo update -p rand # updates just “rand” crate # run the project tests (from src/ and tests/) cargo test +# Clean all output build files and targets +cargo clean + # search for a package cargo search