nix icon indicating copy to clipboard operation
nix copied to clipboard

Unresolved import `nix::fcntl` in WASI

Open antoniomuso opened this issue 2 years ago • 5 comments
trafficstars

I get the following error:

error[E0432]: unresolved import `nix::fcntl`
 --> src/lib.rs:7:10
  |
7 | use nix::fcntl::{flock, FlockArg};
  |          ^^^^^ could not find `fcntl` in `nix`

When I try to compile with cargo build --target wasm32-wasi

antoniomuso avatar Apr 03 '23 15:04 antoniomuso

We don't target that platform. Would you care to submit a PR to add support?

asomers avatar Apr 03 '23 16:04 asomers

When I find time, I will be happy to do it.

antoniomuso avatar Apr 05 '23 09:04 antoniomuso

When I find time, I will be happy to do it.

Have you been able to make it work? WASI/WASM support is the only blocker missing for our usecase as well. However, I do not have the expertise for WASM/WASI/WASIX support. It would be great to have it supported. All other platforms work as expected. Thanks for the info, will check back later.

ris-work avatar Dec 30 '23 15:12 ris-work

When I find time, I will be happy to do it.

Have you been able to make it work? WASI/WASM support is the only blocker missing for our usecase as well. However, I do not have the expertise for WASM/WASI/WASIX support. It would be great to have it supported. All other platforms work as expected. Thanks for the info, will check back later.

Do you guys want to use nix on that target or just make the code compile?

SteveLauC avatar Dec 31 '23 07:12 SteveLauC

When I find time, I will be happy to do it.

Have you been able to make it work? WASI/WASM support is the only blocker missing for our usecase as well. However, I do not have the expertise for WASM/WASI/WASIX support. It would be great to have it supported. All other platforms work as expected. Thanks for the info, will check back later.

Do you guys want to use nix on that target or just make the code compile?

To actively target the wasm/wasi/wasix platform which can be run in a WebAssembly runtime, not just to compile. I'd love to ship executables like that, in a hardware-independent format.

Thanks.

ris-work avatar Dec 31 '23 13:12 ris-work