Create a .devcontainer/devcontainer.json file in your repository root to define the Rust environment for GitHub Codespaces or Gitpod.
{
"image": "mcr.microsoft.com/devcontainers/rust:1-1.90",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"customizations": {
"vscode": {
"extensions": ["rust-lang.rust-analyzer"]
}
}
}
For Gitpod, add a gitpod.yml file with the same image and extensions configuration to ensure consistent tooling across both platforms.