Skip to content

Prepare tests to run on WASIp3 - #1688

Merged
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:wasip3-changes
Aug 20, 2026
Merged

Prepare tests to run on WASIp3#1688
alexcrichton merged 2 commits into
bytecodealliance:mainfrom
alexcrichton:wasip3-changes

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit updates various bits/pieces of infrastructure/tests to ensure that all tests can run on WASIp3 targets in addition to WASIp2 targets. This isn't yet added to CI because toolchains aren't published quite just yet, but everything's been tested locally for now. The changes here are:

  • The wit-component/wasm-tools dependencies are updated.
  • Task state in Rust bindings is now stored in a TLS variable for wasip3 instead of a context slot like in wasip2. This is because context slots are taken in wasip3 for ABI details (stack pointer and TLS base).
  • Task state management in TLS on no-std builds requires an auxiliary C file to store the actual thread local.
  • Tests in C using context slots have a similar change where for wasip2 they use the context slot but for wasip3 they're now using a TLS variable.
  • Tests in Rust using TLS and relying on that being global are updated to use static variables instead as on wasip3 targets TLS is per-task, not global.

This commit updates various bits/pieces of infrastructure/tests to
ensure that all tests can run on WASIp3 targets in addition to WASIp2
targets. This isn't yet added to CI because toolchains aren't published
quite just yet, but everything's been tested locally for now. The
changes here are:

* The wit-component/wasm-tools dependencies are updated.
* Task state in Rust bindings is now stored in a TLS variable for wasip3
  instead of a context slot like in wasip2. This is because context
  slots are taken in wasip3 for ABI details (stack pointer and TLS
  base).
* Task state management in TLS on no-std builds requires an auxiliary C
  file to store the actual thread local.
* Tests in C using context slots have a similar change where for wasip2
  they use the context slot but for wasip3 they're now using a TLS variable.
* Tests in Rust using TLS and relying on that being global are updated
  to use `static` variables instead as on wasip3 targets TLS is
  per-task, not global.
@alexcrichton
alexcrichton requested a review from dicej August 20, 2026 14:37
@alexcrichton
alexcrichton added this pull request to the merge queue Aug 20, 2026
Merged via the queue into bytecodealliance:main with commit b119e28 Aug 20, 2026
29 checks passed
@alexcrichton
alexcrichton deleted the wasip3-changes branch August 20, 2026 17:10
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.

2 participants