Skip to content

Conversation

@pchickey
Copy link
Contributor

This PR makes changes to wasi_unstable_preview0.witx to align with the current implementations (wasi-libc, wasi-common, and the wasi rust crate)

  • environ_sizes_get returns an errno_t as its first result
  • path_open takes a fdflags_t argument.
  • proc_sched_yield is actually called sched_yield

Open question: These changes are seeking to make the witx document descriptive, rather than prescriptive. wasi_unstable_preview0.witx is also out of sync with current implementations by using the wasi_unstable_preview0 module name, where current implementations use wasi_unstable.

Should we instead make phases/old/witx/wasi_unstable.witx that describes current (pre-preview0) implementations? Or should preview0?

@sunfishcode
Copy link
Member

My sense here is that it's early enough that we can go ahead and change wasi_unstable_preview0. We won't want to do this in general, but this is a special case since we wasi_unstable_preview0 didn't go through the ephemeral phase where APIs can settle before we promote them.

Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@pchickey
Copy link
Contributor Author

Agreed, this is a special case because we're trying to get the starting point of the witx spec to match reality (where wasi was specified by the libc's wasi/core.h).

Should we also port these fixes into old/witx/wasi_unstable.witx?

@sunfishcode
Copy link
Member

Yes, I think it makes sense to update old/witx/wasi_unstable.witx too, so that it reflects what implementations are currently using.

@pchickey
Copy link
Contributor Author

pchickey commented Sep 30, 2019

Put the patches into ephemeral as well, since we want them to be the basis of any future PRs to update the ephemeral version of the spec. My take is that if ephemeral is deciding to depart from the implementations, it should do so explicitly

@pchickey pchickey merged commit 38d4558 into master Sep 30, 2019
@pchickey pchickey deleted the pch/witx_corrections branch September 30, 2019 18:27
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
* wasi_unstable_preview0.witx: fixes to match current implementations

* old/wasi_unstable.witx: fixes to match current implementations

* wasi_ephemeral_preview0.witx: fixes to match current implementations
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
* wasi_unstable_preview0.witx: fixes to match current implementations

* old/wasi_unstable.witx: fixes to match current implementations

* wasi_ephemeral_preview0.witx: fixes to match current implementations
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
…ebAssembly#100)

* Fix the extra argument to `append-via-stream`, and misc. doc updates

Fix a spurious extra argument to `append-via-stream`.

Also, add some miscellaneous documentation updates, including:
 - Describing filesystem path separators and sandboxing behavior
 - Clarifying that streams are independent of each other.
 - Remove stale references to the `append` flag.

* More minor formatting fixes.

* Document that `symlink-at` can't create absolute-path symlinks.
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
…bly#110)

Remove the spurious second argument in `append-via-stream`, which is an
oversight from the conversion from resources to standalone functions.

I meant to do this in WebAssembly#100 but apparently lost that part of the diff.
This PR reinstatates it.
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
refactor the imports to its own world
yoshuawuyts pushed a commit to yoshuawuyts/WASI that referenced this pull request Nov 25, 2025
* wasi_unstable_preview0.witx: fixes to match current implementations

* old/wasi_unstable.witx: fixes to match current implementations

* wasi_ephemeral_preview0.witx: fixes to match current implementations
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.

3 participants