dev environment
This commit is contained in:
parent
a41134f12f
commit
4ee17e2188
2 changed files with 33 additions and 9 deletions
|
|
@ -2,8 +2,23 @@
|
||||||
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
|
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
|
||||||
{
|
{
|
||||||
"name": "Rust",
|
"name": "Rust",
|
||||||
|
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
"image": "mcr.microsoft.com/devcontainers/rust:1-bookworm",
|
"image": "debian:bookworm",
|
||||||
|
|
||||||
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
|
"features": {
|
||||||
|
// "ghcr.io/devcontainers/features/git-lfs:1": {},
|
||||||
|
"ghcr.io/devcontainers/features/common-utils:2": {
|
||||||
|
"configureZshAsDefaultShell": "true"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers/features/rust:1": {
|
||||||
|
// "targets": "thumbv7m-none-eabi"
|
||||||
|
},
|
||||||
|
"ghcr.io/devcontainers-contrib/features/apt-get-packages:1": {
|
||||||
|
"packages": "git-flow"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// cargo cache persistence
|
// cargo cache persistence
|
||||||
"mounts": [
|
"mounts": [
|
||||||
|
|
@ -14,11 +29,6 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/devcontainers/features/git-lfs:1": {}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
// "forwardPorts": [],
|
// "forwardPorts": [],
|
||||||
|
|
||||||
|
|
@ -35,8 +45,8 @@
|
||||||
"mhutchie.git-graph"
|
"mhutchie.git-graph"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||||
// "remoteUser": "root"
|
"remoteUser": "vscode"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
16
.vscode/settings.json
vendored
16
.vscode/settings.json
vendored
|
|
@ -3,5 +3,19 @@
|
||||||
"**/.cargo/registry/src/**/*.rs": true,
|
"**/.cargo/registry/src/**/*.rs": true,
|
||||||
"**/.cargo/git/checkouts/**/*.rs": true,
|
"**/.cargo/git/checkouts/**/*.rs": true,
|
||||||
"**/lib/rustlib/src/rust/library/**/*.rs": true,
|
"**/lib/rustlib/src/rust/library/**/*.rs": true,
|
||||||
}
|
},
|
||||||
|
"git.closeDiffOnOperation": true,
|
||||||
|
"[rust]": {
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.organizeImports": "explicit"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// // override the default setting (`cargo check --all-targets`) which produces the following error
|
||||||
|
// // "can't find crate for `test`" when the default compilation target is a no_std target
|
||||||
|
// "rust-analyzer.checkOnSave.allTargets": false,
|
||||||
|
// // with these changes RA will call `cargo check --bins` on save
|
||||||
|
// "rust-analyzer.checkOnSave.extraArgs": [
|
||||||
|
// "--bins"
|
||||||
|
// ],
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue