- Rust Prelude
std::fmt– [[fill]align][sign]['#']['0'][width]['.' precision]type- format!() ∙∙∙∙∙∙∙ print!() ∙∙∙∙∙∙∙ eprint!() ∙∙∙∙∙∙∙ write!()
{}fmt::Display ∙∙∙∙∙∙∙{:?}{:#?}fmt::Debug{:b}binary ∙∙∙∙∙∙∙{:o}octal ∙∙∙∙∙∙∙{:x}hexfn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {...}
- Result<Ok(T), Err(_)>.expect()
- Option<>
cargo new <project_name> --libcargo doc --opencargo [check | run | build --release]cargo update
[workspace]
resolver = "3"
members = ["projects/*"]
# ...............................
[dependencies] # Uses SemVer; 0.4.2 shorthand for ^0.4.2, i.e. [0.4.2, 0.5.0)
utils = { path = "../utils" }
# ...............................
[lints.rust]
# dead_code = "allow"
# unused_variables = "allow"
# unused_imports = "allow"- Windows Def. Install Path:
C:\Users\<user> → ~\.rustup & ~\.cargo - Install | Rust-lang.org
- Downloads | VS Code
- In VSCode workspace, add
.vscode/settings.jsonand list Cargo.toml's (for rust-analyzer extension)-
{ "rust-analyzer.linkedProjects": [ ".\\hello-rust\\Cargo.toml", ".\\ratatui\\counter-app\\Cargo.toml", ".\\ratatui\\json-editor\\Cargo.toml" ] }
-