Skip to content

Port the wasi-filesystem API to the new wit format. #36

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

Merged
merged 10 commits into from
Dec 15, 2021

Conversation

sunfishcode
Copy link
Member

This makes a number of changes, to make use of interface-types features such
as expected, variant types, and resources. The change to use resources in
particular means that filesystem functions are now methods of the descriptor
resource. Since this means renaming everything, take this opportunity to
introduce a new naming conventions, with _at being used for functions that
take dirfd+path arguments.

This also eliminates the rights concept what was present in earlier versions
of WASI, has has discussed in #31. This required adding new flags to open_at,
so while here, this also adds basic chmod-like support, as discussed in #33.

And, this removes support for readdir seeking (seekdir/telldir), as discussed
in #7.

And it adds a fifo file type and a more general socket type, as discussed in #4.

This makes a number of changes, to make use of interface-types features such
as expected, variant types, and resources. The change to use resources in
particular means that filesystem functions are now methods of the descriptor
resource. Since this means renaming everything, take this opportunity to
introduce a new naming conventions, with _at being used for functions that
take dirfd+path arguments.

This also eliminates the rights concept what was present in earlier versions
of WASI, has has discussed in WebAssembly#31. This required adding new flags to open_at,
so while here, this also adds basic chmod-like support, as discussed in WebAssembly#33.

And, this removes support for readdir seeking (seekdir/telldir), as discussed
in WebAssembly#7.

And it adds a fifo file type and a more general socket type, as discussed in WebAssembly#4.
@sunfishcode
Copy link
Member Author

The new content here is based on this proposal template.

@linclark
Copy link
Member

Unfortunately I haven't updated the proposal template yet to reflect the rename of the format. The wai.md file should be wit.md instead.

@sunfishcode
Copy link
Member Author

Indeed, and the tools are still called wai-bindgen and wai-abi, and are still expecting wai. When these are updated, I'll update the proposal here.

@sunfishcode
Copy link
Member Author

wit-bindgen is now updated for the rename, so I've now updated this to rename wai to wit. The remaining piece here is WebAssembly/wasi-tools#1.

@sunfishcode sunfishcode changed the title Port the wasi-filesystem API to the new wai format. Port the wasi-filesystem API to the new wit format. Dec 15, 2021
@sunfishcode
Copy link
Member Author

This has been open for a few weeks, so I'm going to merge this now, so that we can iterate from here with pull requests. If anyone has comments on this, feel free to comment here, or file new issues in the issue tracker.

@sunfishcode sunfishcode reopened this Dec 15, 2021
@sunfishcode sunfishcode merged commit 1d13ebf into WebAssembly:main Dec 15, 2021
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