Skip to content

Commit 3ee2a59

Browse files
authored
Promote WASI 0.3 to the primary preview (#929)
* Promote WASI 0.3 WIT to canonical and collapse 0.3.0-rc/draft to 0.3.0 Remove the 0.2 wit/ directories, rename wit-0.3.0-draft/ to wit/ for each proposal, update deps paths, and collapse 0.3.0-rc-2026-03-15/0.3.0-draft version identifiers to 0.3.0. Update documentation to reflect WASI 0.3: - capture WASI 0.3 inclusion criteria in Proposals.md - treat WASI 0.3 streams as available, not upcoming - replace wasi:http/proxy world with service and middleware - remove obsolete streams workaround and wasi:io references - rewrite POSIX compatibility for 0.3 native async * ci: drop WASI 0.2 and RC paths - ci.yml/validate-proposals.js: single wit/ filter (WIT_FILES) - release.yml/release.sh: single 0.3.x release flow - always regenerate proposal markdown docs from wit/ - publish.yml/publish-proposal.yml: publish from wit/, drop io and the wit-0.3.0-draft/prerelease branches - RELEASE.md/scripts/README.md: update docs to the 0.3 flow * fix: code review suggestions
1 parent 2eb379a commit 3ee2a59

107 files changed

Lines changed: 812 additions & 18057 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.

.github/RELEASE.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,17 @@
1212
1313
┌──────────────────────┼──────────────────────┐
1414
▼ ▼ ▼
15-
┌───────── ┌─────────┐ ┌─────────┐
16-
wasi:io │wasi:cli │ ... │wasi:http
17-
│ → GHCR │ → GHCR │ │ → GHCR │
18-
└───────── └─────────┘ └─────────┘
15+
┌───────────┐ ┌─────────┐ ┌─────────┐
16+
│wasi:random │wasi:cli │ ... │wasi:http
17+
│ → GHCR │ → GHCR │ │ → GHCR │
18+
└───────────┘ └─────────┘ └─────────┘
1919

2020
## Usage
2121

22-
The unified `release.sh` script in `.github/scripts/` handles both patch and RC releases:
22+
The `release.sh` script in `.github/scripts/` cuts a WASI 0.3.x release:
2323

2424
```bash
25-
# Patch release (0.2.x stable)
26-
.github/scripts/release.sh --type patch --prev 0.2.8 --next 0.2.9
27-
28-
# RC release (0.3.0-rc-YYYY-MM-DD)
29-
.github/scripts/release.sh --type rc --prev-rc-date 2025-09-16
30-
.github/scripts/release.sh --type rc # First RC, no previous date
25+
.github/scripts/release.sh --prev 0.3.0 --next 0.3.1
3126
```
3227

3328
## What the Script Does
@@ -37,6 +32,6 @@ The script automates the entire release process:
3732
1. Triggers `release.yml` to bump version numbers and create a PR
3833
2. Waits for the PR to be created and CI to pass
3934
3. Awaits manual review and merge of the PR
40-
4. Creates a GitHub release (with `--prerelease` flag for RC)
35+
4. Creates a GitHub release
4136
5. Waits for `publish.yml` to publish packages to GHCR
4237
6. Validates all packages were published successfully

.github/labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ P-http:
2121
- changed-files:
2222
- any-glob-to-any-file: 'proposals/http/**'
2323

24-
P-io:
25-
- changed-files:
26-
- any-glob-to-any-file: 'proposals/io/**'
27-
2824
P-random:
2925
- changed-files:
3026
- any-glob-to-any-file: 'proposals/random/**'

.github/scripts/README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@ Validates WIT definitions for changed proposals. Used by the CI workflow.
1414

1515
```bash
1616
# Validate specific proposals by simulating changed files
17-
WIT_02_FILES='["proposals/cli/wit/cli.wit"]' node .github/scripts/validate-proposals.js
18-
19-
# Validate 0.3 proposals
20-
WIT_03_FILES='["proposals/http/wit-0.3.0-draft/handler.wit"]' node .github/scripts/validate-proposals.js
17+
WIT_FILES='["proposals/cli/wit/command.wit"]' node .github/scripts/validate-proposals.js
2118

2219
# Validate multiple proposals
23-
WIT_02_FILES='["proposals/cli/wit/cli.wit", "proposals/http/wit/proxy.wit"]' node .github/scripts/validate-proposals.js
20+
WIT_FILES='["proposals/cli/wit/command.wit", "proposals/http/wit/worlds.wit"]' node .github/scripts/validate-proposals.js
2421
```
2522

2623
### Environment Variables
2724

2825
| Variable | Description |
2926
|----------|-------------|
30-
| `WIT_02_FILES` | JSON array of changed files in `proposals/*/wit/**` |
31-
| `WIT_03_FILES` | JSON array of changed files in `proposals/*/wit-0.3.0-draft/**` |
27+
| `WIT_FILES` | JSON array of changed files in `proposals/*/wit/**` |
3228

3329
### What it validates
3430

.github/scripts/release.sh

Lines changed: 17 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
11
#!/bin/bash
22

3-
# Unified release script for WASI releases
3+
# Release script for WASI 0.3.x releases
44
#
5-
# This script automates the release process for both patch (0.2.x) and RC (0.3.0-rc) releases:
5+
# This script automates the release process:
66
# 1. Triggers the release.yml workflow to update versions and create PR
77
# 2. Waits for PR to be filed and CI to pass
88
# 3. Waits for manual PR review and merge
99
# 4. Creates a GitHub release to trigger publishing
1010
# 5. Waits for publish workflow to complete (validates packages in CI)
1111
#
1212
# Usage:
13-
# Patch release: ./release.sh --type patch --prev 0.2.8 --next 0.2.9
14-
# RC release: ./release.sh --type rc [--prev-rc-date 2025-09-16]
13+
# ./release.sh --prev 0.3.0 --next 0.3.1
1514

1615
set -e
1716
set -x
1817

1918
# Parse arguments
20-
RELEASE_TYPE=""
2119
PREV_VERSION=""
2220
NEXT_VERSION=""
23-
PREV_RC_DATE=""
2421

2522
while [[ $# -gt 0 ]]; do
2623
case $1 in
27-
--type) RELEASE_TYPE="$2"; shift 2 ;;
2824
--prev) PREV_VERSION="$2"; shift 2 ;;
2925
--next) NEXT_VERSION="$2"; shift 2 ;;
30-
--prev-rc-date) PREV_RC_DATE="$2"; shift 2 ;;
3126
-h|--help)
3227
echo "Usage:"
33-
echo " Patch release: $0 --type patch --prev <prev_version> --next <next_version>"
34-
echo " RC release: $0 --type rc [--prev-rc-date <YYYY-MM-DD>]"
28+
echo " $0 --prev <prev_version> --next <next_version>"
3529
echo ""
36-
echo "Examples:"
37-
echo " $0 --type patch --prev 0.2.8 --next 0.2.9"
38-
echo " $0 --type rc --prev-rc-date 2025-09-16"
39-
echo " $0 --type rc # First RC, no previous date"
30+
echo "Example:"
31+
echo " $0 --prev 0.3.0 --next 0.3.1"
4032
exit 0
4133
;;
4234
*)
@@ -51,35 +43,17 @@ done
5143
DATE="$(date +'%Y-%m-%d')"
5244
REPO="WebAssembly/WASI"
5345

54-
# Configure based on release type
55-
if [ "$RELEASE_TYPE" == "patch" ]; then
56-
if [ -z "$PREV_VERSION" ] || [ -z "$NEXT_VERSION" ]; then
57-
echo "Error: Patch release requires --prev and --next"
58-
echo "Example: $0 --type patch --prev 0.2.8 --next 0.2.9"
59-
exit 1
60-
fi
61-
TAG="v$NEXT_VERSION"
62-
PRERELEASE_FLAG=""
63-
RELEASE_LABEL="Patch"
64-
elif [ "$RELEASE_TYPE" == "rc" ]; then
65-
NEXT_VERSION="0.3.0-rc-$DATE"
66-
TAG="v$NEXT_VERSION"
67-
PRERELEASE_FLAG="--prerelease"
68-
RELEASE_LABEL="RC"
69-
else
70-
echo "Error: --type must be 'patch' or 'rc'"
71-
echo "Use --help for usage information"
46+
if [ -z "$PREV_VERSION" ] || [ -z "$NEXT_VERSION" ]; then
47+
echo "Error: release requires --prev and --next"
48+
echo "Example: $0 --prev 0.3.0 --next 0.3.1"
7249
exit 1
7350
fi
51+
TAG="v$NEXT_VERSION"
7452

7553
echo "============================================"
76-
echo "WASI $RELEASE_LABEL Release"
54+
echo "WASI Release"
7755
echo "============================================"
78-
if [ "$RELEASE_TYPE" == "patch" ]; then
79-
echo "Previous version: $PREV_VERSION"
80-
else
81-
echo "Previous RC date: ${PREV_RC_DATE:-'(none/first RC)'}"
82-
fi
56+
echo "Previous version: $PREV_VERSION"
8357
echo "Next version: $NEXT_VERSION"
8458
echo "Tag: $TAG"
8559
echo "Repository: $REPO"
@@ -100,21 +74,9 @@ fi
10074
echo ""
10175
echo "Step 1: Triggering release.yml workflow..."
10276

103-
if [ "$RELEASE_TYPE" == "patch" ]; then
104-
gh workflow run "release.yml" \
105-
-f release_type="patch" \
106-
-f prev_version="$PREV_VERSION" \
107-
-f next_version="$NEXT_VERSION"
108-
else
109-
if [ -n "$PREV_RC_DATE" ]; then
110-
gh workflow run "release.yml" \
111-
-f release_type="rc" \
112-
-f prev_rc_date="$PREV_RC_DATE"
113-
else
114-
gh workflow run "release.yml" \
115-
-f release_type="rc"
116-
fi
117-
fi
77+
gh workflow run "release.yml" \
78+
-f prev_version="$PREV_VERSION" \
79+
-f next_version="$NEXT_VERSION"
11880

11981
# Wait for workflow to start
12082
echo "Waiting for workflow to start..."
@@ -180,7 +142,7 @@ echo ""
180142
echo "Step 4: Creating GitHub release $TAG..."
181143
sleep 5
182144

183-
gh release create "$TAG" --generate-notes $PRERELEASE_FLAG
145+
gh release create "$TAG" --generate-notes
184146
gh release view "$TAG"
185147

186148
# Step 5: Wait for publish workflow
@@ -206,5 +168,5 @@ fi
206168

207169
echo ""
208170
echo "============================================"
209-
echo "✓ Release $NEXT_VERSION ($RELEASE_LABEL) completed successfully!"
171+
echo "✓ Release $NEXT_VERSION completed successfully!"
210172
echo "============================================"

.github/scripts/validate-proposals.js

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ const { execSync } = require('child_process');
44
const fs = require('fs');
55
const { validateDirectory, formatErrors } = require('./validate-since');
66

7-
const witPath = (proposal, version) => {
8-
if (version === '0.2') return `proposals/${proposal}/wit`;
9-
if (version === '0.3') return `proposals/${proposal}/wit-0.3.0-draft`;
10-
throw new Error(`Unknown version: ${version}`);
11-
};
12-
137
const parseFiles = (filesJson) => {
148
if (!filesJson || filesJson === 'null') return [];
159
try {
@@ -45,17 +39,7 @@ const run = (cmd) => {
4539
};
4640

4741
// Collect proposals to validate from changed files
48-
const toValidate = [];
49-
const filesByVersion = [
50-
[process.env.WIT_02_FILES, '0.2'],
51-
[process.env.WIT_03_FILES, '0.3'],
52-
];
53-
54-
for (const [filesJson, version] of filesByVersion) {
55-
for (const proposal of extractProposals(parseFiles(filesJson))) {
56-
toValidate.push({ proposal, version });
57-
}
58-
}
42+
const toValidate = extractProposals(parseFiles(process.env.WIT_FILES));
5943

6044
if (toValidate.length === 0) {
6145
console.log('No proposals to validate');
@@ -64,33 +48,41 @@ if (toValidate.length === 0) {
6448

6549
let failed = false;
6650

67-
for (const { proposal, version } of toValidate) {
68-
const witDir = witPath(proposal, version);
69-
console.log(`::group::Validating ${proposal} v${version}`);
51+
for (const proposal of toValidate) {
52+
const witDir = ((proposal) => `proposals/${proposal}/wit`)(proposal);
53+
console.log(`::group::Validating ${proposal}`);
7054

7155
try {
7256
console.log(` Path: ${witDir}`);
7357

58+
// Skip proposals whose wit/ directory no longer exists. A PR that removes a
59+
// proposal still surfaces its deleted files in the changed-file list, but
60+
// there is nothing left to validate.
61+
if (!fs.existsSync(witDir)) {
62+
console.log(` Skipping ${proposal}: ${witDir} no longer exists (proposal removed)`);
63+
continue;
64+
}
65+
7466
// Check wit-deps lock if deps.toml exists
7567
if (fs.existsSync(`${witDir}/deps.toml`)) {
7668
console.log(' Checking dependencies...');
7769
if (!run(`wit-deps -m "${witDir}"/deps.toml -l "${witDir}"/deps.lock -d "${witDir}"/deps lock --check`)) {
78-
console.log(`::error::wit-deps lock check failed for ${proposal} v${version}`);
70+
console.log(`::error::wit-deps lock check failed for ${proposal}`);
7971
failed = true;
8072
}
8173
}
8274

8375
// Validate WIT syntax
8476
console.log(' Validating WIT...');
8577
if (!run(`wasm-tools component wit "${witDir}" -o /dev/null`)) {
86-
console.log(`::error::WIT validation failed for ${proposal} v${version}`);
78+
console.log(`::error::WIT validation failed for ${proposal}`);
8779
failed = true;
8880
}
8981

9082
// Validate wasm encoding
9183
console.log(' Validating wasm encoding...');
9284
if (!run(`wasm-tools component wit "${witDir}" --wasm -o /dev/null`)) {
93-
console.log(`::error::wasm encoding failed for ${proposal} v${version}`);
85+
console.log(`::error::wasm encoding failed for ${proposal}`);
9486
failed = true;
9587
}
9688

@@ -99,7 +91,7 @@ for (const { proposal, version } of toValidate) {
9991
const sinceErrors = validateDirectory(witDir);
10092
if (sinceErrors.length > 0) {
10193
console.log(formatErrors(sinceErrors));
102-
console.log(`::error::@since validation failed for ${proposal} v${version}: ${sinceErrors.length} missing annotation(s)`);
94+
console.log(`::error::@since validation failed for ${proposal}: ${sinceErrors.length} missing annotation(s)`);
10395
failed = true;
10496
}
10597
} finally {

.github/scripts/validate-since.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ if (require.main === module) {
171171

172172
if (args.length === 0) {
173173
console.log('Usage: node validate-since.js <directory>');
174-
console.log('Example: node validate-since.js proposals/io/wit');
174+
console.log('Example: node validate-since.js proposals/clocks/wit');
175175
process.exit(1);
176176
}
177177

.github/workflows/ci.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ on:
55
branches: [main]
66
paths:
77
- 'proposals/**/wit/**'
8-
- 'proposals/**/wit-0.3.0-draft/**'
98
- '.github/scripts/**'
109
- '.github/workflows/ci.yml'
1110
pull_request:
1211
branches: [main]
1312
paths:
1413
- 'proposals/**/wit/**'
15-
- 'proposals/**/wit-0.3.0-draft/**'
1614
- '.github/scripts/**'
1715
- '.github/workflows/ci.yml'
1816

@@ -28,18 +26,15 @@ jobs:
2826
with:
2927
list-files: json
3028
filters: |
31-
wit-02:
29+
wit:
3230
- 'proposals/*/wit/**'
33-
wit-03:
34-
- 'proposals/*/wit-0.3.0-draft/**'
3531
3632
- name: Install tools
37-
if: steps.changes.outputs.wit-02 == 'true' || steps.changes.outputs.wit-03 == 'true'
33+
if: steps.changes.outputs.wit == 'true'
3834
uses: ./.github/actions/install-tools
3935

4036
- name: Validate changed proposals
41-
if: steps.changes.outputs.wit-02 == 'true' || steps.changes.outputs.wit-03 == 'true'
37+
if: steps.changes.outputs.wit == 'true'
4238
run: node .github/scripts/validate-proposals.js
4339
env:
44-
WIT_02_FILES: ${{ steps.changes.outputs.wit-02_files }}
45-
WIT_03_FILES: ${{ steps.changes.outputs.wit-03_files }}
40+
WIT_FILES: ${{ steps.changes.outputs.wit_files }}

.github/workflows/publish-proposal.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
required: true
1919
type: string
2020
wit_dir:
21-
description: 'WIT directory (wit or wit-0.3.0-draft)'
21+
description: 'WIT directory'
2222
required: true
2323
type: string
2424
wkg_version:

0 commit comments

Comments
 (0)