wasi-common: add preopened_handle, to be able to open any handle#2569
wasi-common: add preopened_handle, to be able to open any handle#2569Ekleog wants to merge 1 commit intobytecodealliance:mainfrom
Conversation
|
Side-note: |
684de13 to
26bc178
Compare
|
Hi. Sorry I missed your message on the bytecode alliance discord. Your use case is important to me. I'm nearing completion of a complete rewrite of wasi-common that, among other things, redesigns the traits so that files and directories have distinct sets of methods. #2487 I expect this PR will land within a week or so. (When it is ready to land, i'll rename the wasi-c2 crate back to wasi-common, thats just a name under development.) The new design of the ctx builder should support your use case possible - https://github.com/bytecodealliance/wasmtime/blob/pch/wasi_common_cap_std/crates/wasi-c2/src/ctx.rs#L104 Is it OK to close this PR and you can re-target your work at the rewritten wasi-common? |
|
That sounds awesome, thank you! Is there a branch somewhere where wasmtime-wasi depends on this version of wasi-common so I could take a git-dependency and start developing against that version? |
|
If you're on that branch and depend on |
|
Great, I'll try doing that. Thank you!
|
This is a follow-up to #1600 ; that also makes it possible to write custom Handles for directories. For my specific case, it is so as to be able to have a wasmtime-async-compatible WASI.
I've raised the question on zulip #wasmtime without answer yet (not sure whether #general should be preferred?), so I've just decided to go on with this PR, and will start using my fork and checking whether I can make things work properly with it starting now :)