Repository navigation
Add a corpus of real toolchain-built components for end-to-end tests - #71
Merged
Merged
Conversation
jeremyg484
approved these changes
Oct 21, 2026
jeremyg484
left a comment
Collaborator
There was a problem hiding this comment.
Overall, this looks great! There may be some other test program examples we could borrow from Wasmtime at some point in the future: https://github.com/bytecodealliance/jco/tree/main/crates/test-components/src/bin
Specifically the p2_* test programs might be worth pulling in, or at least some subset of them. We might also want to take the wasi-testsuite p1 programs and apply the component adapter shim to them.
But that can all be done later, this is a great start!
Contributor
Author
I thought about it but a first attempt seemed to be steep, so decided to take it from another angle: WebAssembly/wasi-testsuite#295 Next time I'll look into the jco tests, thanks for the pointer! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
component-corpus, a module of real toolchain-built components for end-to-end tests, mirroring Endive'swasm-corpus. Upstreamwasi-testsuitehas no WASI 0.2 tests (only p1 and p3), so this is our p2 conformance source.wasm32-wasip2command programs (hello, args, env, exit codes, stdin, file read/write, directory listing, random, clocks), each with a spec in the wasi-testsuite format Endive's runner reads (args,env,root,exit_code,stdout,stderr) and fixture files. There is also awit-bindgenlibrary component covering records, variants, enums, flags, options, results, lists, strings, tuples and a resource../run.sh rebuild && ./run.sh rustreproduces the committed binaries byte for byte. UseCONTAINER=podmanfor Podman../run.sh verifyruns every spec on wasmtime, so expectations are checked against the reference runtime.ComponentLinker.A follow-up runs the command programs through
WasiPreview2. It needs wasi:cli and version-compatible linking, and all 11 programs already pass locally with the same exit codes and output as wasmtime.