Skip to content

Commit 83eb3c8

Browse files
author
Your Name
committed
Add devcontainer
0 parents  commit 83eb3c8

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM ubuntu:22.04 as rbase
2+
RUN apt-get update && \
3+
apt-get install -y \
4+
git \
5+
curl \
6+
build-essential
7+
8+
# Install latest version of Rust
9+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
10+
ENV PATH="/root/.cargo/bin:${PATH}"
11+
RUN cargo install cargo-dist

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"build": {
3+
"target": "rbase",
4+
"args": {
5+
"DOCKER_BUILDKIT": "1"
6+
}
7+
},
8+
"name": "KSYM",
9+
"context": "..",
10+
"dockerFile": "Dockerfile",
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"ms-vscode.cpptools",
15+
"ms-azuretools.vscode-docker",
16+
"ms-vscode.makefile-tools",
17+
"ms-vscode.cpptools-extension-pack",
18+
"Codeium.codeium"
19+
]
20+
}
21+
},
22+
"runArgs": [
23+
"--cap-add=SYS_PTRACE",
24+
"--security-opt",
25+
"seccomp=unconfined"
26+
],
27+
"mounts": [
28+
"source=${localWorkspaceFolder},target=/home/ws,type=bind",
29+
"source=${localEnv:HOME},target=/home/share,type=bind"
30+
]
31+
}

.vscode/tasks.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Build",
6+
"type": "shell",
7+
"command": "cargo build",
8+
"group": "build",
9+
"options": {
10+
"cwd": "${workspaceFolder}/rbase"
11+
}
12+
},
13+
{
14+
"label": "Run",
15+
"type": "shell",
16+
"command": "cargo run -- /root/6.8.7/Image-arm32",
17+
"group": "build",
18+
"options": {
19+
"cwd": "${workspaceFolder}/rbase"
20+
}
21+
},
22+
{
23+
"label": "Pretty",
24+
"type": "shell",
25+
"command": "cargo fmt",
26+
"group": "build",
27+
"options": {
28+
"cwd": "${workspaceFolder}/rbase"
29+
}
30+
},
31+
]
32+
}

0 commit comments

Comments
 (0)