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

Cannot compile to wasm32-wasi #195

Closed
Cyborus04 opened this issue Nov 7, 2021 · 2 comments · Fixed by #210
Closed

Cannot compile to wasm32-wasi #195

Cyborus04 opened this issue Nov 7, 2021 · 2 comments · Fixed by #210

Comments

@Cyborus04
Copy link

I was trying to make a crate for getting cap_std::fs::Dirs from wasi's preopened dirs, but hit a bit of a roadblock
It seems even when compiling to wasi, cap-primitives still tries to access std::os::unix

error[E0433]: failed to resolve: could not find `unix` in `os`
  --> cap-primitives\src\rsix\fs\copy_impl.rs:34:18
   |
34 |     use std::os::unix::fs::PermissionsExt;
   |                  ^^^^ could not find `unix` in `os`

+16 other errors

(on nightly)

@sunfishcode
Copy link
Member

It appears cap-std's wasi port has fallen a bit behind. I'll work on that.

@sunfishcode
Copy link
Member

This needs rust-lang/rust#90835.

sunfishcode added a commit that referenced this issue Jan 4, 2022
This gets cap-primitives and cap-std to the point where they compile on
WASI. There are a few TODOs, and some of this will need to be revisited
as WASI evolves and adds `chmod` support, but this should suffice for
now.

Fixes #195.
sunfishcode added a commit that referenced this issue Jan 4, 2022
This gets cap-primitives and cap-std to the point where they compile on
WASI. There are a few TODOs, and some of this will need to be revisited
as WASI evolves and adds `chmod` support, but this should suffice for
now.

Fixes #195.
sunfishcode added a commit that referenced this issue Jan 4, 2022
This gets cap-primitives and cap-std to the point where they compile on
WASI. There are a few TODOs, and some of this will need to be revisited
as WASI evolves and adds `chmod` support, but this should suffice for
now.

Fixes #195.
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 a pull request may close this issue.

2 participants