Skip to content
Merged
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
35 changes: 17 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ on:

env:
CARGO_TERM_COLOR: always
WASI_SDK_VERSION: 20.46gf3a1f8991535
WASI_SDK_RELEASE: wasi-sockets-alpha-5
WASI_SDK_VERSION: 27

permissions:
contents: write
Expand All @@ -31,7 +30,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.14.0-rc.3"

- name: Install latest Rust nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -57,16 +56,16 @@ jobs:
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-linux.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-linux.tar.gz
mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz
mv wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux /opt/wasi-sdk

- name: Cache CPython
id: cache-cpython-wasi
uses: actions/cache@v4
with:
path: cpython/builddir/wasi
key: cpython-wasi
key: cpython-wasi-v1
enableCrossOsArchive: true

- name: Build
Expand All @@ -85,7 +84,7 @@ jobs:
os: "ubuntu-latest",
arch: "amd64",
maturin_target: "x86_64",
wasiSDK: "linux",
wasiSDK: "x86_64-linux",
extension: "",
buildArgs: "",
target: "",
Expand All @@ -95,7 +94,7 @@ jobs:
os: "ubuntu-latest",
arch: "aarch64",
maturin_target: "aarch64",
wasiSDK: "linux",
wasiSDK: "x86_64-linux",
extension: "",
buildArgs: "--target aarch64-unknown-linux-gnu",
target: "aarch64-unknown-linux-gnu",
Expand All @@ -105,7 +104,7 @@ jobs:
os: "macos-latest",
arch: "amd64",
maturin_target: "x86_64",
wasiSDK: "macos",
wasiSDK: "arm64-macos",
extension: "",
buildArgs: "",
target: "",
Expand All @@ -115,7 +114,7 @@ jobs:
os: "macos-latest",
arch: "aarch64",
maturin_target: "aarch64",
wasiSDK: "macos",
wasiSDK: "arm64-macos",
extension: "",
buildArgs: "--target aarch64-apple-darwin",
target: "aarch64-apple-darwin",
Expand All @@ -125,7 +124,7 @@ jobs:
os: "windows-latest",
arch: "amd64",
maturin_target: "x64",
wasiSDK: "mingw",
wasiSDK: "x86_64-windows",
extension: ".exe",
buildArgs: "",
target: "",
Expand All @@ -139,7 +138,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.14.0-rc.3"

- name: Install latest Rust nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand Down Expand Up @@ -182,25 +181,25 @@ jobs:
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz

- name: Install WASI-SDK
if: runner.os != 'Windows'
shell: bash
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }} /opt/wasi-sdk

- name: Install WASI-SDK on Windows
if: runner.os == 'Windows'
shell: bash
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }})" >> ${GITHUB_ENV}

- name: Restore CPython
id: cache-cpython-wasi
uses: actions/cache/restore@v4
with:
path: cpython/builddir/wasi
key: cpython-wasi
key: cpython-wasi-v1
enableCrossOsArchive: true

- name: Build wheels
Expand Down
31 changes: 15 additions & 16 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ concurrency:

env:
CARGO_TERM_COLOR: always
WASI_SDK_VERSION: 20.46gf3a1f8991535
WASI_SDK_RELEASE: wasi-sockets-alpha-5
WASI_SDK_VERSION: 27

jobs:
linux:
Expand All @@ -29,7 +28,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.14.0-rc.3"

- name: Install latest Rust nightly toolchain
uses: dtolnay/rust-toolchain@nightly
Expand All @@ -55,16 +54,16 @@ jobs:
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-linux.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-linux.tar.gz
mv wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux.tar.gz
mv wasi-sdk-${WASI_SDK_VERSION}.0-x86_64-linux /opt/wasi-sdk

- name: Cache CPython
id: cache-cpython-wasi
uses: actions/cache@v4
with:
path: cpython/builddir/wasi
key: cpython-wasi
key: cpython-wasi-v1
enableCrossOsArchive: true

- name: Build
Expand All @@ -78,9 +77,9 @@ jobs:
fail-fast: false
matrix:
config:
- { os: "ubuntu-latest", wasiSDK: "linux" }
- { os: "macos-latest", wasiSDK: "macos" }
- { os: "windows-latest", wasiSDK: "mingw" }
- { os: "ubuntu-latest", wasiSDK: "x86_64-linux" }
- { os: "macos-latest", wasiSDK: "arm64-macos" }
- { os: "windows-latest", wasiSDK: "x86_64-windows" }
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
Expand Down Expand Up @@ -112,25 +111,25 @@ jobs:
shell: bash
run: |
cd /tmp
curl -LO https://github.com/dicej/wasi-sdk/releases/download/${WASI_SDK_RELEASE}/wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}-${{ matrix.config.wasiSDK }}.tar.gz
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION}/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz
tar xf wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }}.tar.gz

- name: Install WASI-SDK
if: runner.os != 'Windows'
shell: bash
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION} /opt/wasi-sdk
run: sudo mv /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }} /opt/wasi-sdk

- name: Install WASI-SDK on Windows
if: runner.os == 'Windows'
shell: bash
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION})" >> ${GITHUB_ENV}
run: echo "WASI_SDK_PATH=$(cygpath -m /tmp/wasi-sdk-${WASI_SDK_VERSION}.0-${{ matrix.config.wasiSDK }})" >> ${GITHUB_ENV}

- name: Restore CPython
id: cache-cpython-wasi
uses: actions/cache/restore@v4
with:
path: cpython/builddir/wasi
key: cpython-wasi
key: cpython-wasi-v1
enableCrossOsArchive: true

- name: Lint
Expand All @@ -143,7 +142,7 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: "3.14.0-rc.3"

- name: Test
shell: bash
Expand Down
17 changes: 7 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ channel](https://bytecodealliance.zulipchat.com/#narrow/stream/394175-SIG-Guest-

## Building from source

For the time being, we use temporary forks of `wasi-sdk` and `wasi-libc` which
enable support for `wasi-sockets`. Once that support is upstreamed, we'll
switch.

### Prerequisites

- Tools needed to build [CPython](https://github.com/python/cpython) (Make, Clang, etc.)
Expand All @@ -42,15 +38,16 @@ First, make sure you've got all the submodules cloned.
git submodule update --init --recursive
```

Next, install WASI SDK to `/opt/wasi-sdk` (alternatively, you can specify a
Next, install WASI-SDK 27 to `/opt/wasi-sdk` (alternatively, you can specify a
different location and reference it later using the `WASI_SDK_PATH` environment
variable). Replace `linux` with `macos` or `mingw` (Windows) below depending on
your OS.
variable). Replace `arm64-linux` with `x86_64-linux`, `arm64-macos`,
`x86_64-macos`, `arm64-windows`, or `x86_64-windows` below depending on your
architecure and OS, if necessary.

```shell
curl -LO https://github.com/dicej/wasi-sdk/releases/download/wasi-sockets-alpha-5/wasi-sdk-20.46gf3a1f8991535-linux.tar.gz
tar xf wasi-sdk-20.46gf3a1f8991535-linux.tar.gz
sudo mv wasi-sdk-20.46gf3a1f8991535 /opt/wasi-sdk
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-arm64-linux.tar.gz
tar xf wasi-sdk-27.0-arm64-linux.tar.gz
sudo mv wasi-sdk-27.0-arm64-linux /opt/wasi-sdk
export WASI_SDK_PATH=/opt/wasi-sdk
```

Expand Down
Loading