Skip to content

Commit 8cd99fd

Browse files
committed
docs: Add new pages for Cargo tools and Rust features
- Created pages for `cargo clippy`, `cargo`, `rustfix`, `rustfmt`, and `rustup` - Added details on usage and functionality for each tool - Included information on Rust prelude and type checking
1 parent 20c8fa3 commit 8cd99fd

File tree

9 files changed

+40
-0
lines changed

9 files changed

+40
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
alias:: [[Type Checking]]

pages/Rust___prelude.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- a collection of items [[Rust]] auto-imports
2+
- `String` and `str`
3+
- `Vec<T>`
4+
- `Option<T>` and `Result<T, E>`
5+
- `Box<T>`
6+
- essentially the same as doing `use std::prelude::v1::*;`

pages/Rust___rustup.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-

pages/Rust___use.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- this is how to import packages in rust
2+
- some standard imports are already imported with [[Rust/prelude]]
3+
-

pages/cargo.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
tags:: [[Rust/Tool]], [[Package Manager]]
2+
3+
- packages are referred to as [[cargo/crate]]s
4+
- [[cargo/new]] creates a new package
5+
- you may need to specify `--name` flag if the folder starts with a number (illegal for package names to have numbers)
6+
- [[cargo/build]] builds
7+
- [[cargo/build/--release]] builds with optimizations, putting executable in `target/release` instead of `target/debug`
8+
- [[cargo/run]] builds and runs **more convenient**
9+
- [[cargo/check]] does [[Static Code Analysis]], specifically [[Programming/Code/Analysis/Static/Type/Check/ing]]
10+
-

pages/cargo___clippy.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tags:: [[Linter]], [[Rust/Tool]]
2+
3+
- `cargo clippy`
4+
- For more information on Clippy, see [its documentation](https://github.com/rust-lang/rust-clippy).

pages/rustfix.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
alias:: [[cargo/fix]]
2+
tags:: [[Rust/Tool]]
3+
4+
- # `rustfix` aka `cargo fix`
5+
- can automatically fix compiler warnings that have clear way to solve it.
6+
- [D - Useful Development Tools - The Rust Programming Language](https://rust-book.cs.brown.edu/appendix-04-useful-development-tools.html)

pages/rustfmt.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
alias:: [[cargo/fmt]]
2+
tags:: [[Rust/Tool]]
3+
4+
- [[Format/er]] for [[Rust]]
5+
- [[Rust]] installations include `rustfmt` by default usually
6+
- `cargo fmt` should do it
7+
-

pages/rustup.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `rustup update` - update rust
2+
-

0 commit comments

Comments
 (0)