Skip to content
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

Fix WASI directory bugs, improve WASI preopen APIs #1263

Closed
wants to merge 1 commit into from

Conversation

MarkMcCaskey
Copy link
Contributor

Fixes the issue with the /, adds support for preopened directories with / in it and ./ in it:

  • ./ forces it to open in "the current directory" (. (technically /. due to the implementation))
  • / opens it in the root
  • no prefix now behaves the same as ./
  • multiple / in a preopen alias will traverse the filesystem and open directories as needed

New logic likely not fully applied, WasiFs::new() does not support the new logic (this is still used in generate_import_object_snapshot0....)

I just realized I didn't retest the --dir=a/b/c case at all, that logic has not been updated here

Review

  • Add a short description of the the change to the CHANGELOG.md file

@MarkMcCaskey MarkMcCaskey requested a review from syrusakbary March 3, 2020 01:20
bors bot added a commit that referenced this pull request Mar 4, 2020
1267: Improve support for preopened directories in WASI syscalls r=MarkMcCaskey a=MarkMcCaskey

Ported over from #1263 

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <[email protected]>
@stale
Copy link

stale bot commented Jul 14, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale Inactive issues or PR label Jul 14, 2021
@Hywan Hywan added the 📦 lib-wasi About wasmer-wasi label Jul 19, 2021
@stale stale bot removed the 🏚 stale Inactive issues or PR label Jul 19, 2021
@Hywan Hywan added 🏚 stale Inactive issues or PR bug Something isn't working labels Jul 19, 2021
@stale stale bot removed the 🏚 stale Inactive issues or PR label Jul 19, 2021
@Hywan
Copy link
Contributor

Hywan commented Jul 19, 2021

Probably still relevant.

@syrusakbary
Copy link
Member

I believe this is already fixed on master. In case is not, we will need to re-implement/reopen

@epilys epilys deleted the feature/fix-wasi-preopen-and-improve-it branch May 4, 2022 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📦 lib-wasi About wasmer-wasi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants