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
32 changes: 30 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ FROM mcr.microsoft.com/devcontainers/cpp:${VARIANT}
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get update \
&& apt-get upgrade -y

RUN apt-get update \
&& apt-get install -y apt-transport-https apt-utils build-essential \
ca-certificates ccache clang-format-14 curl file g++-multilib git gnupg \
ca-certificates ccache curl file g++-multilib git gnupg \
libgcc-12-dev lib32gcc-12-dev libzstd-dev lsb-release \
ninja-build ocaml ocamlbuild opam \
python3-venv python3-pip \
Expand All @@ -23,7 +25,7 @@ RUN apt-get update \

WORKDIR /opt

ARG WASI_SDK_VER=25
ARG WASI_SDK_VER=29
RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VER}/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux.tar.gz -P /tmp \
&& tar xf /tmp/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux.tar.gz -C /opt \
&& ln -sf /opt/wasi-sdk-${WASI_SDK_VER}.0-x86_64-linux /opt/wasi-sdk
Expand All @@ -35,6 +37,32 @@ RUN wget -c --progress=dot:giga https://github.com/WebAssembly/wabt/releases/dow

# set path

# Install wasm-tools
ARG WASM_TOOLS_VER=1.243.0
RUN wget -c --progress=dot:giga https://github.com/bytecodealliance/wasm-tools/releases/download/v${WASM_TOOLS_VER}/wasm-tools-${WASM_TOOLS_VER}-x86_64-linux.tar.gz -P /tmp
RUN tar xzf /tmp/wasm-tools-${WASM_TOOLS_VER}-x86_64-linux.tar.gz -C /opt\
&& ln -sf /opt/wasm-tools-${WASM_TOOLS_VER}-x86_64-linux/wasm-tools /usr/local/bin/wasm-tools

# set proxy variables for sudoer
RUN echo 'Defaults env_keep += "http_proxy https_proxy no_proxy HTTP_PROXY HTTPS_PROXY NO_PROXY"' | tee /etc/sudoers.d/proxy

# Install uv for virtual environment management
RUN wget -qO- https://astral.sh/uv/install.sh | sh

# Install utilities for C/C++ development
RUN apt-get update \
&& apt-get install -y --no-install-recommends bear ccache clang-tidy shellcheck

# Install clang-format-21 from the official LLVM apt repository
# (Debian 12 default repositories do not provide clang-format-21)
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc \
&& echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-21 main" > /etc/apt/sources.list.d/llvm.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends clang-format-21

# set path
RUN ln -sf /usr/bin/clang-format-21 /usr/bin/clang-format

# clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
Expand Down
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
"settings": {},
"extensions": [
"dtsvet.vscode-wasm",
"esbenp.prettier-vscode",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-vscode.cmake-tools"
"ms-vscode.cmake-tools",
"ms-vscode.cpptools-extension-pack",
"streetsidesoftware.code-spell-checker",
"vadimcn.vscode-lldb"
]
}
},
Expand Down
4 changes: 4 additions & 0 deletions .devcontainer/finalize.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
set -o errexit
set -o pipefail
set -o nounset

echo "Running finalize script..."

#
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.*
!.gitignore
!.devcontainer
!.github

.cache
.clangd
Expand Down