What is Cargo? [6 of 35] | Beginner's Series to: Rust

Play What is Cargo? [6 of 35] | Beginner's Series to: Rust

The Discussion

  • User profile image
    With cargo you won't need mkdir or rustc to create the project from scratch.

    cargo new cargo-hello-world
    ^ Creates a binary Cargo package in the given directory.

    ^ (shell command) Lists directory contents of files and directories.

    ^ (shell command) Can be used to create single or multiple files, view contain of file, concatenate files and redirect output in terminal or files.

    cargo build
    ^ Compiles local packages and all of their dependencies with Hello World boilerplate.

    cargo run
    ^ Builds the local package and run its main target (assuming only one binary)

    cargo test
    ^ Executes all the unit and integration tests of the current package.

    All cargo commands can be found here :

Add Your 2 Cents