Skip to content

Instantly share code, notes, and snippets.

@dhbradshaw
Created December 5, 2019 12:43
Show Gist options
  • Save dhbradshaw/25aa8ddf09a893f2fc9923048aeda2d6 to your computer and use it in GitHub Desktop.
Save dhbradshaw/25aa8ddf09a893f2fc9923048aeda2d6 to your computer and use it in GitHub Desktop.
Rust setup

Rust setup

More often than one might expect, I find myself setting up a new environment for rust development.
Here are some things that I end up doing repeatedly.

Summary

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-watch

sudo apt install libpq-dev
cargo install diesel_cli --no-default-features --features postgres

cargo install mdbook

rustup

Get rustup to manage rust language versions.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

https://rustup.rs/

cargo watch

Install cargo-watch for rapid feedback while iterating.

cargo install cargo-watch

https://github.com/passcod/cargo-watch

diesel

Install the diesel client for database management. (Here requiring postgres only)

sudo apt install libpq-dev
cargo install diesel_cli --no-default-features --features postgres

https://diesel.rs/guides/getting-started/

mdbook

I like to write books using mdbook, so I install that everywhere as well.

cargo install mdbook

https://github.com/rust-lang/mdBook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment