Skip to content

Instantly share code, notes, and snippets.

@lukehinds
Last active December 8, 2018 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehinds/1701233ca7287817a16b6da634fe5548 to your computer and use it in GitHub Desktop.
Save lukehinds/1701233ca7287817a16b6da634fe5548 to your computer and use it in GitHub Desktop.

Cargo

cargo new hello_cargo # create new project
cargo run # compile and run
cargo build # build
cargo build --release # compiled with optimizations 
cargo fmt --all -- --check # check formatting (but don't correct)
cargo fmt --all # correct formatting.

$ git clone someurl.com/someproject
$ cd someproject
$ cargo build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment