Tooling Flashcards

1
Q

What is Rustup?

A

A tool to install the rust toolchain and update it (among others?)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is rustc?

A

The rust compiler.
Compile a file with
rustc file.rs

Then run it with
./file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is rustfmt?

A

Automatic formatter included with the standard rust distribution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is cargo?

A

Package manager and build system!

Builds code, downloads libraries, builds libraries,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to create a new project?

A

Either by creating an .rs file manually or using cargo new

cargo new hello_cargo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to create a new project?

A

Either by creating an .rs file manually or using cargo new

cargo new hello_cargo

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Anatomy of a rust project

A

Cargo.toml
src/
target/ (git ignored)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does TOML stand for?

A

Toms obvious minimal language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What cargo commands are useful?

A

cargo new
cargo run
cargo check (build without creating executable to check whether it compiles)
cargo build
cargo add (new command to add dependencies)
cargo update (only updates within semver, change manually in toml file to update further)
cargo doc –open (build all docs of your packages locally and open in browser)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly