Skip to content

Commit a70dc0d

Browse files
authored
Add basic codespaces configuration (#1646)
1 parent dc36207 commit a70dc0d

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

.devcontainer/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/rust/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): buster, bullseye
4+
ARG VARIANT="buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>
10+
11+
USER vscode
12+
RUN cargo install cargo-make

.devcontainer/devcontainer.json

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/rust
3+
{
4+
"name": "Rust",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
9+
// Use bullseye when on local on arm64/Apple Silicon.
10+
"VARIANT": "buster"
11+
}
12+
},
13+
"runArgs": [
14+
"--cap-add=SYS_PTRACE",
15+
"--security-opt",
16+
"seccomp=unconfined"
17+
],
18+
19+
// Set *default* container specific settings.json values on container create.
20+
"settings": {
21+
"lldb.executable": "/usr/bin/lldb",
22+
// VS Code don't watch files under ./target
23+
"files.watcherExclude": {
24+
"**/target/**": true
25+
},
26+
"rust-analyzer.checkOnSave.command": "clippy"
27+
},
28+
29+
// Add the IDs of extensions you want installed when the container is created.
30+
"extensions": [
31+
"vadimcn.vscode-lldb",
32+
"mutantdino.resourcemonitor",
33+
"matklad.rust-analyzer",
34+
"tamasfe.even-better-toml",
35+
"serayuzgur.crates"
36+
],
37+
38+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
39+
// "forwardPorts": [],
40+
41+
// Use 'postCreateCommand' to run commands after the container is created.
42+
// "postCreateCommand": "rustc --version",
43+
44+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
45+
"remoteUser": "vscode"
46+
}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ tools/datagen/tests/testdata/work_log_bincode
3535
# Other blanket directory ignores
3636
**/node_modules/
3737
**/_debug/
38+
39+
.venv

0 commit comments

Comments
 (0)