Commit b119e28
authored
Prepare tests to run on WASIp3 (#1688)
* Prepare tests to run on WASIp3
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.
* Fix C++ compat in tests1 parent bd5e46c commit b119e28
14 files changed
Lines changed: 277 additions & 112 deletions
File tree
- ci
- crates/guest-rust/src/rt
- async_support
- tests/runtime
- cancel-import
- future-cancel-read
- future-close-then-receive-read
- moonbit/stream-write-cancel
- pending-import
- ping-pong
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
| |||
86 | 99 | | |
87 | 100 | | |
88 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
89 | 112 | | |
90 | 113 | | |
91 | 114 | | |
| |||
0 commit comments