This gist is a formatted collection of personal notes taken during local Rust setup on a macbook laptop in preperation for "The Book".
This is written for Jacob (the author) to look back on and question his own decisions. Follow at your own risk.
This was all written with 3.5 hours of sleep. Good luck.
Install Rust + cargo + fun bits using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstall an editor of choice that has LSP support for autocompletion and more--recommended:
- VSCODE
- if brew installed
brew install --cask visual-studio-code
- if brew installed
- NVIM + AstroNvim + extras
Install rust-analyzer to your IDE.
Install the evcxr repl:
cargo install --locked evcxr_replNow you can code in your terminal using a poorly named project:
> evcxr
Welcome to evcxr. For help, type :help
>> println!("hello world")
hello world
()
>> :quitThink nodemon, or entr. Use bacon or watchexec, I chose bacon.
bacon is a background code checker.
It's designed for minimal interaction so that you can just let it run, alongside your editor, and be notified of warnings, errors, or test failures in your Rust code.
cargo install --locked bacon- Lightly skim "The Book" once
- Work through Rustlings as you read "The Book" a second time, more in depth
- Tokio - A runtime for writing reliable, asynchronous, and slim applications with the Rust programming language.
- Tracing - A framework for instrumenting Rust programs to collect structured, event-based diagnostic information.
- reqwest - An ergonomic, batteries-included HTTP Client for Rust.
- Rayon - A data-parallelism library for Rust.
- AWS SDK - AWS SDK with initial emphasis on S3.
- clap - A command line argument parser.
- sqlx - An async, pure Rust SQL crate featuring compile-time checked queries without a DSL.
- chrono - Aims to provide all functionality needed to do correct operations on dates and times in the proleptic Gregorian calendar.
- egui - A simple, fast, and highly portable immediate mode GUI library for Rust. egui runs on the web, natively, and in your favorite game engine.
- Yew - A modern Rust framework for creating multi-threaded front-end web apps with WebAssembly.
- clippy - A collection of lints to catch common mistakes and improve your Rust code.
- At minimum, enable
unwrap_used&expect_used
- At minimum, enable