Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM mcr.microsoft.com/devcontainers/rust
# Use an official base image as a parent image
FROM rust:latest

COPY .devcontainer/setup.sh /tmp/setup.sh
RUN chmod +x /tmp/setup.sh
USER vscode
RUN /tmp/setup.sh
# FROM mcr.microsoft.com/devcontainers/rust

# COPY .devcontainer/setup.sh /tmp/setup.sh
# RUN chmod +x /tmp/setup.sh
# USER vscode
# RUN /tmp/setup.sh
34 changes: 31 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,35 @@
"dockerfile": "Dockerfile",
"context": ".."
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"features": {
"ghcr.io/devcontainers/features/common-utils:2.5.4": {
"username": "vscode",
"uid": 1000,
"gid": 1000,
"installZsh": false,
"installOhMyZsh": false,
"upgradePackages": true,
"nonFreePackages": false
}
},
"customizations": {
"vscode": {
"settings": {
"lldb.executable": "/usr/bin/lldb",
"files.watcherExclude": {
"**/target/**": true
}
},
"extensions": [
"ms-azuretools.vscode-docker",
"rust-lang.rust-analyzer",
"fill-labs.dependi",
"tamasfe.even-better-toml",
"vadimcn.vscode-lldb",
"ms-vscode-remote.remote-containers"
]
}
},
"postCreateCommand": "sh .devcontainer/setup.sh",
"remoteUser": "vscode"
}
}
4 changes: 2 additions & 2 deletions .devcontainer/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ curl https://wasmtime.dev/install.sh -sSf | bash
rustup target add wasm32-wasip2

# C/C++
WASI_SDK_PATH="$HOME/wasi-sdk-25.0"
WASI_SDK_PATH="$HOME/wasi-sdk-27.0"
mkdir -p "$WASI_SDK_PATH"
curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-linux.tar.gz | tar -xz -C "$WASI_SDK_PATH" --strip-components=1
curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz | tar -xz -C "$WASI_SDK_PATH" --strip-components=1
echo "export WASI_SDK_PATH=$WASI_SDK_PATH" >> ~/.bashrc
echo "alias clang=$WASI_SDK_PATH/bin/clang" >> ~/.bashrc
echo "alias clang++=$WASI_SDK_PATH/bin/clang++" >> ~/.bashrc
Expand Down
Loading
Loading