Build Tools
- Bacon
Bacon Real-Time Compile
- Cargo
Cargo
- Cargo Workspaces
Cargo Project Workspaces
- Clippy
Clippy Linter Tool
- Panamax
Panamax Offline Repo
Rust Tools
External links:
- https://youtu.be/ifaLk5v3W90
- https://youtu.be/kQvMPfR7OwE
- Example of WebAssembly + Rust = https://makepad.dev/
- Rustup toolchain installer - https://rustup.rs/
- Tokei Lines of code count - https://github.com/XAMPPRocky/tokei
- Rustup add-ons needed for formatting and as dependencies:
rustup component add rustfmt
rustup component add rust-src- Rust-analyzer -
brew install rust-analyzer - Astro Vim for fast IDE, upgrade on NVIM - https://astronvim.github.io
git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim +PackerSync
# After install use commands:
:LspInstall rust -> rust-analyzer
:TSInstall rust- Neovide GUI upgrade on Astro Vim
git clone https://github.com/neovide/neovide
cd neovide
cargo build --release- EVCXR or iRUST REPL
cargo install evcxr_repl
cargo install irustVSCode Extensions for Rust
- CodeLLDB
- Dependi (бывш crates) - сообщает, если пакеты устарели
VSCode Settings
(For CodeLLDB) Allow breakpoints everywhere: "debug.allowBreakpointsEverywhere": true
cargo check: поменять check на clippy: "rust-analyzer.check.command": "clippy"
Rust Prelude
Rust has a Prelude - a set of libraries included in every project. See current libs included in Prelude
User input
std::io::stdin library is used to get user input from standard input stream. Not included in Prelude:
use std:io
let mut guess = String::new();
io::stdin().read_line(&mut guess).expect("Failed to load");.expect handles Err variant of read_line function, crashing the program with the defined error message.