Skip to content

Instantly share code, notes, and snippets.

@kharioki
Created July 5, 2022 02:51
Show Gist options
  • Save kharioki/ea9d92f929d728e497b70b2c0d69fa45 to your computer and use it in GitHub Desktop.
Save kharioki/ea9d92f929d728e497b70b2c0d69fa45 to your computer and use it in GitHub Desktop.
Rust env configuration for macbook
### MacPorts
# requires the pkg to be present, ignore if already installed
xcode-select --install
sudo xcodebuild -license
sudo installer -pkg MacPorts-2.7.1-11-BigSur.pkg -target /
sudo port selfupdate
### VS Code
# requires the app directory, ignore if already installed
sudo cp -r 'Visual Studio Code.app' /Applications/
code_ext() { code --install-extension "$1"; }
### Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup toolchain add nightly
rustup toolchain add beta
rustup target add wasm32-unknown-unknown
rustup component add clippy
code_ext matklad.rust-analyzer
code_ext statiolake.vscode-rustfmt
### Postgres -> currently only via brew
brew install postgresql libpq # assumes homebrew is installed, beware on M1 machines
### NodeJS + NEAR
sudo port install nodejs17 npm8
sudo npm i -g [email protected]
### Code QC
# JS, Markdown, etc
sudo npm i -g prettier
code_ext esbenp.prettier-vscode
# shell scripts
sudo port install shfmt
code_ext mkhl.shfmt
# TOML
cargo install taplo-cli
code_ext tamasfe.even-better-toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment