Skip to content

Commit a145f18

Browse files
author
Timmy Silesmo
committed
Merge branch 'main' into dev/timmy/wasi-http-header-bug
# Conflicts: # crates/csharp/src/function.rs # crates/csharp/src/interface.rs # crates/csharp/src/world_generator.rs # tests/runtime/lists.rs # tests/runtime/lists/test.wit # tests/runtime/lists/wasm.cs
2 parents 9dd1262 + ffbf78c commit a145f18

738 files changed

Lines changed: 42358 additions & 15120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/python-3/.devcontainer/base.Dockerfile
1+
FROM mcr.microsoft.com/devcontainers/rust
22

3-
# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3.7, 3.6, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3.7-bullseye, 3.6-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster, 3.7-buster, 3.6-buster
4-
ARG VARIANT="3.10-bullseye"
5-
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
6-
7-
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8-
ARG NODE_VERSION="none"
9-
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10-
11-
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
12-
# COPY requirements.txt /tmp/pip-tmp/
13-
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
14-
# && rm -rf /tmp/pip-tmp
15-
16-
# [Optional] Uncomment this section to install additional OS packages.
17-
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
18-
# && apt-get -y install --no-install-recommends <your-package-list-here>
19-
20-
# [Optional] Uncomment this line to install global node packages.
21-
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
22-
23-
RUN cd /opt && curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz \
24-
| tar -xz
25-
ENV WASI_SDK_PATH=/opt/wasi-sdk-22.0
26-
27-
RUN echo 'alias clang=/opt/wasi-sdk-22.0/bin/clang' >> /etc/bash.bashrc
28-
RUN echo 'alias clang++=/opt/wasi-sdk-22.0/bin/clang++' >> /etc/bash.bashrc
3+
COPY .devcontainer/setup.sh /tmp/setup.sh
4+
RUN chmod +x /tmp/setup.sh
5+
USER vscode
6+
RUN /tmp/setup.sh

.devcontainer/devcontainer.json

Lines changed: 9 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,11 @@
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.234.0/containers/python-3
1+
// For format details, see https://aka.ms/devcontainer.json.
32
{
4-
"name": "Dev",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"context": "..",
8-
"args": {
9-
// Update 'VARIANT' to pick a Python version: 3, 3.10, 3.9, 3.8, 3.7, 3.6
10-
// Append -bullseye or -buster to pin to an OS version.
11-
// Use -bullseye variants on local on arm64/Apple Silicon.
12-
"VARIANT": "3.9",
13-
// Options
14-
"NODE_VERSION": "16"
15-
}
16-
},
17-
18-
// Set *default* container specific settings.json values on container create.
19-
"settings": {
20-
"python.defaultInterpreterPath": "/usr/local/bin/python",
21-
"python.linting.enabled": true,
22-
"python.linting.pylintEnabled": true,
23-
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
24-
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
25-
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
26-
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
27-
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
28-
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
29-
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
30-
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
31-
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
32-
},
33-
34-
// Add the IDs of extensions you want installed when the container is created.
35-
"extensions": [
36-
"ms-python.python",
37-
"ms-python.vscode-pylance"
38-
],
39-
40-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
41-
// "forwardPorts": [],
42-
43-
// Use 'postCreateCommand' to run commands after the container is created.
44-
"postCreateCommand": "bash .devcontainer/finalize.sh",
45-
46-
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
47-
"remoteUser": "vscode",
48-
"features": {
49-
"rust": "latest"
50-
}
3+
"name": "Dev",
4+
"build": {
5+
"dockerfile": "Dockerfile",
6+
"context": ".."
7+
},
8+
9+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
10+
"remoteUser": "vscode"
5111
}

.devcontainer/finalize.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

.devcontainer/setup.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/sh
2+
set -e
3+
cd $HOME
4+
5+
# Wasmtime: Used as default test runner.
6+
curl https://wasmtime.dev/install.sh -sSf | bash
7+
8+
# Rust: Install additional targets not present in the docker base image.
9+
rustup target add wasm32-wasip2
10+
11+
# C/C++
12+
WASI_SDK_PATH="$HOME/wasi-sdk-25.0"
13+
mkdir -p "$WASI_SDK_PATH"
14+
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
15+
echo "export WASI_SDK_PATH=$WASI_SDK_PATH" >> ~/.bashrc
16+
echo "alias clang=$WASI_SDK_PATH/bin/clang" >> ~/.bashrc
17+
echo "alias clang++=$WASI_SDK_PATH/bin/clang++" >> ~/.bashrc
18+
19+
# .NET
20+
DOTNET_PATH="$HOME/.dotnet"
21+
mkdir -p "$DOTNET_PATH"
22+
curl -sSL https://dot.net/v1/dotnet-install.sh -o $DOTNET_PATH/dotnet-install.sh
23+
chmod +x $DOTNET_PATH/dotnet-install.sh
24+
$DOTNET_PATH/dotnet-install.sh --channel 9.0 --install-dir $DOTNET_PATH
25+
echo "export PATH=$DOTNET_PATH:\$PATH" >> ~/.bashrc
26+
27+
# Moonbit
28+
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash
29+
echo 'export PATH="$HOME/.moon/bin:$PATH"' >> ~/.bashrc
30+
31+
# Go
32+
GO="go-$(uname -s | tr 'A-Z' 'a-z')-$(uname -m | sed -e 's/aarch64/arm64/' -e 's/x86_64/amd64/')-bootstrap"
33+
curl -OL https://github.com/dicej/go/releases/download/go1.25.5-wasi-on-idle/$GO.tbz
34+
tar xf $GO.tbz
35+
rm $GO.tbz
36+
echo "export PATH=$HOME/$GO/bin:\$PATH" >> ~/.bashrc

.github/actions/install-wasi-sdk/action.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,32 @@ runs:
55
using: composite
66
steps:
77
- run: |
8-
curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-linux.tar.gz -L | tar xzvf -
9-
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-linux" >> $GITHUB_ENV
8+
curl --retry 5 --retry-all-errors -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-30/wasi-sdk-30.0-x86_64-linux.tar.gz
9+
tar xzvf wasi-sdk.tar.gz
10+
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-30.0-x86_64-linux" >> $GITHUB_ENV
1011
if: runner.os == 'Linux'
1112
shell: bash
13+
working-directory: ${{ runner.tool_cache }}
1214
- run: |
13-
curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-macos.tar.gz -L | tar xzvf -
14-
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-macos" >> $GITHUB_ENV
15+
curl --retry 5 --retry-all-errors -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-30/wasi-sdk-30.0-arm64-macos.tar.gz
16+
tar xzvf wasi-sdk.tar.gz
17+
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-30.0-arm64-macos" >> $GITHUB_ENV
1518
if: runner.os == 'macOS'
1619
shell: bash
20+
working-directory: ${{ runner.tool_cache }}
1721
- run: |
18-
curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-24/wasi-sdk-24.0-x86_64-windows.tar.gz -L | tar xzvf -
19-
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-24.0-x86_64-windows" >> $GITHUB_ENV
22+
curl --retry 5 --retry-all-errors -L -o wasi-sdk.tar.gz https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-30/wasi-sdk-30.0-x86_64-windows.tar.gz
23+
tar xzvf wasi-sdk.tar.gz
24+
echo "WASI_SDK_PATH=`pwd`/wasi-sdk-30.0-x86_64-windows" >> $GITHUB_ENV
2025
if: runner.os == 'Windows'
2126
shell: bash
27+
working-directory: ${{ runner.tool_cache }}
28+
2229
- name: Setup `wasm-tools`
2330
uses: bytecodealliance/actions/wasm-tools/setup@v1
2431
with:
25-
version: "1.215.0"
32+
version: "1.241.2"
2633
- name: Setup `wasmtime`
2734
uses: bytecodealliance/actions/wasmtime/setup@v1
2835
with:
29-
version: "30.0.1"
36+
version: "dev"

0 commit comments

Comments
 (0)