-
Notifications
You must be signed in to change notification settings - Fork 228
Add a wasm32-wasip3 target #700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Procedurally, I wanted to open this to showcase my thoughts on what wasm32-wasip3 will look like. This isn't ready for usage (everything, including printing, returns an error and is unimplemented) nor distribution. What it is ready for, however, would be to incrementally land implementations of functions after this PR. This is split up into a number of commits that I plan to land as separate PRs. For example:
|
|
I have a first working stdout implementation for p3 based on this patch at https://github.com/cpetig/wasi-libc/tree/wasip3 . I guess that p3 needs some more infrastructure ( |
|
PS: |
|
See also alexcrichton#1 |
|
Thanks! My plan was to land implementation work of actual interfaces as separate PRs to make them easier to review so I'm going to hold off on merging that into this PR's branch, but @cpetig would you be willing to do a follow-up once this PR lands? I'd be happy to review! |
211b32a to
6cb5a05
Compare
😉 My plan with alexcrichton#1 was to show that there is benefit in getting this PR merged even in its incomplete state. I will rebase the patches and move discussion to https://github.com/WebAssembly/wasi-libc/pulls once this PR is merged. |
Almost all functions are stubbed out to return errors. This is all done in preparation for eventually filling out these functions, but the goal of this commit is to lay down the scaffolding of the target rather than actually implement anything. CI jobs are added to build and test this target. Most tests are expected to fail, but all tests are still run as usual. Once tests are passing they'll be updated in `CMakeLists.txt` to flag the test as expected to pass instead of expected to fail. This is a very large PR line-wise, but all the major changes with large chunks of code are generated code and are expected to be easy to review. The actual changes here in the source are primarily: * Adding `#elif defined(__wasip3__)` cases * Sometimes using the WASIp2 definitions of functions for WASIp3 * Shuffling naming in the network utilities to support both WASIp2 and WASIp3 which have the same types, just renamed. * Generated bindings for WASIp3 are now vendored like WASIp2 bindings. * Wasmtime is updated for testing to be able to run generated WASIp3 binaries.
|
Ok all the requisite pieces have now landed so this should be good to go |
Almost all functions are stubbed out to return errors. This is all done
in preparation for eventually filling out these functions, but the goal
of this commit is to lay down the scaffolding of the target rather than
actually implement anything.
CI jobs are added to build and test this target. Most tests are expected
to fail, but all tests are still run as usual. Once tests are passing
they'll be updated in
CMakeLists.txtto flag the test as expected topass instead of expected to fail.
This is a very large PR line-wise, but all the major changes with large
chunks of code are generated code and are expected to be easy to review.
The actual changes here in the source are primarily:
#elif defined(__wasip3__)casesWASIp3 which have the same types, just renamed.
binaries.