260811.1 · Adopt Component Model map and implements features for 0.3.1 (#950)
CI Scripts
cm-features.js
Reads the Component Model adoption record in docs/ComponentModelFeatures.md,
which is the single source of truth for which gated features WASI requires.
publish.ymlruns it to write the “Component Model features” section of each releasedspecifications/wasi-<version>/Overview.md.validate-proposals.jsimportsreadRecordfrom it to build thewasm-tools validatefeature flags.
# Print the section for a given version
node .github/scripts/cm-features.js 0.3.1validate-proposals.js
Validates WIT definitions for changed proposals. Used by the CI workflow.
Prerequisites
- Node.js
- Wasm-toolsgithub
- wit-depsgithub
Running Locally
# Validate specific proposals by simulating changed files
WIT_FILES='["proposals/cli/wit/command.wit"]' node .github/scripts/validate-proposals.js
# Validate multiple proposals
WIT_FILES='["proposals/cli/wit/command.wit", "proposals/http/wit/worlds.wit"]' node .github/scripts/validate-proposals.jsEnvironment Variables
| Variable | Description |
|---|---|
WIT_FILES |
JSON array of changed files in proposals/*/wit/** |
What it validates
- wit-deps lock - If
deps.tomlexists, checks thatdeps.lockis up to date - WIT syntax - Parses WIT files with
Wasm-tools component wit - Wasm encoding - Validates Wasm binary encoding with
--Wasmflag