Rust Dev Machine ready to be used by you and your team with either Codespace or DevContainers.
- Uses Very Fast Linker MOLD , set as default linker
- Uses Sccache for caching crates
- Bonus Vscode Plugins for 10X Rust Developers
- cargo runner - Run , Test , Doc-Test , Build Without Mental Overhead
- cargo bin - Run any cargo bin commands on your $CARGO_HOME/bin
- Vscode
- Codespace
- Devcontainer
- clone this repo
git clone https://github.com/codeitlikemiley/rust-on-steroids YOUR_NEXT_BIG_PROJECT
- update
.env.mysql
or.env.postgres
depending on your db of choice, thencp .env.example .env
on.devcontainer
folder
e.g. change Database URL on .devcontainer/.env
if you wanna use external service like planetscale, you can set it here.
DATABASE_URL=postgresql://postgres:secret@db:5432/db_name?sslmode=disable
-
Update
.devcontainer/.bash_aliases
-
Open Command Palette type
Open Folder in Container
orCreate new Codespace
-
Open Command Palette type
Open Terminal
cd crates
- sqlx-cli
- cargo-chef
- cargo-generate
- cargo-hack
- cargo-lambda
- cargo-leptos
- cargo-nextest
- cargo-shuttle
- cargo-watch
- cloak
- snip-cli
- ws-cli
- pulumi
- Export keys
gpg --list-secret-keys
gpg --armor --export-secret-keys [key-ID] > privatekey.asc
- Copy the key
cat privatekey.asc | pbcopy
- Create a new file on /workspace/private.asc and paste the key there
code /workspace/private.asc
- Import they key
gpg --import private.asc
- open terminal and run
gs
Note: you can only git commit inside vscode after you run gs and import gpg key
- generate service
cd services
generate example
# the command below can be optionally run
ws add services/example
- Generate a new Server
generate server
// default service is example
# we need to add server to workspace
ws add server
Some pre-installed CLI are incompatible , e.g. cargo-nextest , if you cannot run that the solution is to run
cargo binstall -y --force cargo-nextest