Codespaces
Setup from default for Rust ๐
These are my custom setups if you just want rust only see the rust website.
Feel free to download the scripts to review to decide if you want to use them. They are pretty simple.
Install Rust only ๐
curl --proto '=https' --tlsv1.2 -sSf https://dev.chester.wykies.com/github/codespaces/scripts/setup_rust_only.sh | sh
Install Rust with Trunk (Usually only needed if your developing for the web) ๐
curl --proto '=https' --tlsv1.2 -sSf https://dev.chester.wykies.com/github/codespaces/scripts/setup_with_trunk.sh | bash
At this point youโll need to either restart you terminal or source the cargo setup script manually.
source "$HOME/.cargo/env"
Itโs probably a good idea to ensure the OS is up to date. Depending on what youโre doing this may not matter for example just navigating code and not running anything (This is my opinion I havenโt though long enough about this to be sure).
sudo apt update && sudo apt upgrade
Use devcontainer ๐
I found this post helpful to get an idea of the options available.
I also found a repo microsoft with pre-configured dev containers https://github.com/devcontainers/images/tree/main/src/rust
Seems to work by copying all the files from .devcontainer
into the root of your repo and then when a codespace is request to be created it uses those files.
It takes a lot longer with not much visual feedback but seems to have worked.
Would need to be customized to also install trunk when needed.
For now I will just work with my script as I have more control over it and I can see the progress as it goes.
Pricing ๐
By default you cannot perform actions that would result in billing according the GitHub Docs.
Go to settings to see your usage.