Skip to content

Commit 3d45221

Browse files
committed
Merge branch 'main' into nested-interfaces
2 parents 90a402f + 1cdafa7 commit 3d45221

File tree

446 files changed

+26510
-4159
lines changed

Some content is hidden

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

446 files changed

+26510
-4159
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto
2+
*.waves text eol=lf
3+
*.out text eol=lf

.github/workflows/main.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
- build: aarch64-linux
3434
os: ubuntu-latest
3535
target: aarch64-unknown-linux-gnu
36-
- build: wasm32-wasi
36+
- build: wasm32-wasip1
3737
os: ubuntu-latest
38-
target: wasm32-wasi
38+
target: wasm32-wasip1
3939
steps:
4040
- uses: actions/checkout@v4
4141
with:
@@ -44,7 +44,7 @@ jobs:
4444
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
4545
with:
4646
name: ${{ matrix.build }}
47-
if: matrix.build != 'wasm32-wasi'
47+
if: matrix.build != 'wasm32-wasip1'
4848
- run: |
4949
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
5050
rustup target add ${{ matrix.target }}
@@ -132,11 +132,12 @@ jobs:
132132
submodules: true
133133
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
134134
with:
135-
toolchain: 1.77.0
135+
toolchain: 1.79.0
136+
- run: rustup target add wasm32-wasip1
136137
- run: |
137-
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz
138-
tar xf wasi-sdk-21.0-linux.tar.gz
139-
export WASI_SDK_PATH=$(pwd)/wasi-sdk-21.0
138+
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz
139+
tar xf wasi-sdk-22.0-linux.tar.gz
140+
export WASI_SDK_PATH=$(pwd)/wasi-sdk-22.0
140141
cd crates/wit-component/dl && bash check.sh
141142
142143
wasm:
@@ -147,13 +148,14 @@ jobs:
147148
with:
148149
submodules: true
149150
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
151+
- run: rustup target add wasm32-wasip1
150152
- run: |
151153
tag=v10.0.1
152154
curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/${tag}/wasmtime-${tag}-x86_64-linux.tar.xz
153155
tar xf wasmtime-${tag}-x86_64-linux.tar.xz
154156
echo `pwd`/wasmtime-${tag}-x86_64-linux >> $GITHUB_PATH
155-
echo CARGO_TARGET_WASM32_WASI_RUNNER='wasmtime run --dir . --' >> $GITHUB_ENV
156-
echo CARGO_BUILD_TARGET='wasm32-wasi' >> $GITHUB_ENV
157+
echo CARGO_TARGET_WASM32_WASIP1_RUNNER='wasmtime run --dir . --' >> $GITHUB_ENV
158+
echo CARGO_BUILD_TARGET='wasm32-wasip1' >> $GITHUB_ENV
157159
- run: |
158160
cargo --locked test --workspace \
159161
--exclude fuzz-stats \
@@ -168,6 +170,7 @@ jobs:
168170
- uses: actions/checkout@v4
169171
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
170172
- run: rustup component add rustfmt
173+
- run: printf "\n" > playground/component/src/bindings.rs
171174
# Note that this doesn't use `cargo fmt` because that doesn't format
172175
# modules-defined-in-macros which is in use in `wast` for example. This is
173176
# the best alternative I can come up with at this time

.github/workflows/playground.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build playground
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
merge_group:
7+
8+
# Cancel any in-flight jobs for the same PR/branch so there's only one active
9+
# at a time
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
build:
20+
name: Build playground deployment
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: true
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
30+
- uses: cargo-bins/[email protected]
31+
- run: cargo binstall cargo-component -y
32+
- run: rustup component add rustfmt # needed for cargo-component, apparently?
33+
- run: rustup target add wasm32-wasip1
34+
- run: npm ci
35+
working-directory: playground
36+
- run: npm run build
37+
working-directory: playground
38+
39+
# also prepare to deploy GH pages on main
40+
- if: github.ref == 'refs/heads/main'
41+
uses: actions/configure-pages@v5
42+
- if: github.ref == 'refs/heads/main'
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: "./playground/dist"
46+
47+
deploy:
48+
name: Deploy playground
49+
if: github.ref == 'refs/heads/main'
50+
needs: build
51+
permissions:
52+
pages: write
53+
id-token: write
54+
runs-on: ubuntu-latest
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
steps:
59+
- id: deployment
60+
uses: actions/deploy-pages@v4

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ merged once all tests are passing. CI checks currently include:
107107
* Code is all formatted correctly (use `cargo fmt` locally to pass this)
108108
* Tests pass on Rust stable, beta, and Nightly.
109109
* Tests pass on Linux, macOS, and Windows.
110-
* This tool can be compiled to WebAssembly using the `wasm32-wasi` target.
110+
* This tool can be compiled to WebAssembly using the `wasm32-wasip1` target.
111111
* Fuzzers can be built.
112112
* Various miscellaneous checks such as building the tool with various
113113
combinations of Cargo features.

0 commit comments

Comments
 (0)