ctaggart opened issue #9695:
For https://github.com/WebAssembly/wasi-cli/blob/main/wit/environment.wit, the
initial-cwd
implementation currently just returnsNone
. Adding this issue highlighted by theFIXME
:
alexcrichton commented on issue #9695:
This'd perhaps be a good first issue for someone to get their feet wet if they're interested. The general idea to implement this would probably be something like:
- Add a builder method to
WasiCtxBuilder
.- Fill in
initial_cwd
linked above to read theWasCtx
"built value"- This'll still be
None
by default for backwards-compat- The
wasmtime
CLI can probably grow a few new options:
-S cwd=<path>
- explicitly setting the path to the cwd- (if you're adventurous)
-S inherit-fs
- inherit the whole filesystem and set the cwd to the process's cwd- (if you're extra adventurous) unify
-S inherit-*
under-S inherit[=fs,network,...]
where-S inherit
can be "inherit the whole shebang" while-S inherit-fs
could be-S inherit=fs
.
alexcrichton added the good first issue label to Issue #9695.
stephenmuss commented on issue #9695:
@alexcrichton I'd be keen to have a crack at this.
I have a wip branch and commit at https://github.com/stephenmuss/wasmtime/commit/af44736104b2803b451faa0e783461ab88515c29, would be good to know I'm heading down the right path.
alexcrichton commented on issue #9695:
Looking good! That's mostly just missing a test and should be good to land :+1:
Last updated: Dec 23 2024 at 12:05 UTC