Rust Web Development

Code written while reading the book "Rust Web Development" by Bastian Gruber.

Setup

  1. git clone git@github.com:pmuens/rust-web-development.git
  2. asdf install
  3. Run cp .env.example .env and update the file
  4. Run ./docker.sh in terminal #1
  5. Run cargo run in terminal #2
  6. Run a cURL command in terminal #3

Useful Commands

asdf install

cargo init
cargo new <name> [--lib]

cargo build [--bin <binary>]
cargo clean
cargo test
cargo bench

cargo update
cargo add <name>
cargo search <name>

cargo run [--bin <binary>] [-- arg]

cargo doc [--open]
cargo fix
cargo fmt
cargo clippy
cargo check

cargo install <name>
cargo uninstall <name>

Useful Resources