Skip to content

Commit 826613e

Browse files
committed
Merge branch 'main' of github.com:HaoboGu/rmk
2 parents 7649ed9 + 6059f1b commit 826613e

3 files changed

Lines changed: 89 additions & 0 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM rust:latest
2+
3+
ENV SHELL=/bin/bash
4+
5+
RUN apt-get update && apt-get install -y \
6+
bash-completion \
7+
libclang-dev \
8+
clang \
9+
usbutils \
10+
git \
11+
curl
12+
13+
RUN apt-get clean -y && \
14+
apt-get autoremove --purge -y && \
15+
rm -rf /var/lib/apt/lists/*
16+
17+
RUN cargo install flip-link cargo-make
18+
19+
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
20+
21+
RUN mkdir -p /root/.vscode-server/extensions
22+
23+
# Set working directory
24+
WORKDIR /workspace
25+
VOLUME ["/workspace"]
26+
27+
CMD ["/bin/bash"]

.devcontainer/devcontainer.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
3+
{
4+
"name": "RMK Development",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"build": {
7+
"dockerfile": "Dockerfile"
8+
},
9+
// Needed for USB devices in container
10+
"privileged": true,
11+
"runArgs": ["--privileged"],
12+
"containerEnv": {
13+
"WORKSPACE_DIR": "/workspace"
14+
},
15+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
16+
"workspaceFolder": "/workspace",
17+
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
18+
// "mounts": [
19+
// {
20+
// "source": "devcontainer-cargo-cache-${devcontainerId}",
21+
// "target": "/usr/local/cargo",
22+
// "type": "volume"
23+
// }
24+
// ],
25+
"mounts": [
26+
// Persist installed extensions in container
27+
"source=rmk-devcontainer-extensions,target=/root/.vscode-server/extensions,type=volume",
28+
// Allow attaching USB devices to running container
29+
"source=/dev,target=/dev,type=bind"
30+
],
31+
32+
// Features to add to the dev container. More info: https://containers.dev/features.
33+
// "features": {},
34+
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Use 'postCreateCommand' to run commands after the container is created.
39+
// "postCreateCommand": "",
40+
41+
// Configure tool-specific properties.
42+
// "customizations": {},
43+
44+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
45+
// "remoteUser": "root",
46+
47+
"customizations": {
48+
"vscode": {
49+
"extensions": [
50+
"rust-lang.rust-analyzer",
51+
"dustypomerleau.rust-syntax",
52+
"tamasfe.even-better-toml"
53+
]
54+
}
55+
}
56+
}

.vscode/extensions.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"probe-rs.probe-rs-debugger",
4+
"marus25.cortex-debug"
5+
]
6+
}

0 commit comments

Comments
 (0)