Skip to content

[wasm] Add W0 scoot-wasm bytecode host - #145

Merged
jamiesun merged 1 commit into
mainfrom
feat/wasm-host-w0
Jun 26, 2026
Merged

[wasm] Add W0 scoot-wasm bytecode host#145
jamiesun merged 1 commit into
mainfrom
feat/wasm-host-w0

Conversation

@jamiesun

Copy link
Copy Markdown
Collaborator

Summary

  • add a default-off -Dwasm-host=true build option that installs the standalone scoot-wasm binary
  • add a pure Zig Wasm bytecode structure decoder for W0 validation: magic/version, section order and lengths, LEB128 parsing, and basic index/count consistency
  • deepen scoot wasm-tools check so package validation reads and validates component.wasm structure without executing Wasm
  • update EN/ZH Wasm tool docs and test fixtures for valid MVP modules

Refs #100. This intentionally keeps W1-W4 VM, validator, engine, and WASI execution work out of this PR.

Validation

  • env ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache zig build test
  • env ZIG_GLOBAL_CACHE_DIR=/tmp/zig-cache zig build -Dwasm-host=true
  • mdbook build book/en
  • mdbook build book/zh
  • ./zig-out/bin/scoot-wasm check /tmp/scoot-empty.wasm
  • ./zig-out/bin/scoot-wasm check /tmp/scoot-bad.wasm returns the expected failure
  • ./zig-out/bin/scoot wasm-tools check /tmp/scoot-wasm-tool-check
  • ./zig-out/bin/scoot-wasm check /tmp/scoot-add.wasm for a temporary PIC-built Zig wasm fixture

Note: local pre-push CI also passed during git push -u origin feat/wasm-host-w0.

@jamiesun
jamiesun marked this pull request as ready for review June 26, 2026 14:02
@jamiesun
jamiesun merged commit a3f7ddd into main Jun 26, 2026
7 checks passed
@jamiesun
jamiesun deleted the feat/wasm-host-w0 branch June 26, 2026 14:21
jamiesun added a commit that referenced this pull request Jun 27, 2026
- wasm host W0-W4: integer, WASI preview1, type validation, float execution (#145, #147, #148, #149, #162)
- feat: wasm_tool action for compute-only packages (#154)
- wasm: narrow plugin sandbox to stdin/stdout/stderr/argv as a new hard rule (#164)
- feat: committed playground test environment with full action coverage (#161)
- release: single ReleaseSafe flavor, ship scoot-wasm artifacts, Homebrew tap (#166)
- fix(release): reference SCOOT_DOCKERHUB_* secrets so Docker Hub login is attempted
- docs: README rewrite + infographic, English comment translation (#160, #165, #146, #153)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant