-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
wasmtime serve seems to ignore --dir option, directory is not preopened #9194
Comments
Thanks for the detailed report! I think the main issue is with this line where that causes After doing that you'll want to pass Does that help clarify what's happening? |
@alexcrichton yes, that makes sense. I removed that line and now the component works as expected, thank you so much! I went through the documentation for wasmtime, and couldn't find any mention of what proxy:true does. I'll keep digging, but is there info about this already published I'm not finding? Again, much appreciated! |
Solved by removing the |
Ah the reason you didn't find that in the wasmtime docs is that it's a feature of |
Excellent, thank you! I'll put together some documentation once I figure out what it does in detail 🙂 |
We've been trying to create a wasi:http world file to have access to the filesystem. We couldn't get it working.
Test Case
I've put up a repository here: https://github.com/javorszky/wasmtime-fscheck-serve which has the source code, a dockerfile, a makefile to make sure everything is consistent across different machines and host triplets.
Steps to Reproduce
make bd
make dr
Expected Results
I expect the wasm component to respond with a 200 OK with the body being the list of files and directories in the opened directory.
Actual Results
Response is a panicked crash with the following error log in docker:
The important error is this one:
coming from this source code:
where the command to start it was
Versions and Environment
Wasmtime version or commit: wasmtime-cli 24.0.0
Operating system: linux bullseye (docker base image is
rust:bullseye
)Architecture: aarch64-unknown-linux-gnu
Extra Info
It looks like preopen doesn't happen with wasmtime serve, as there's no
openat
syscall to the directory we're trying to preopen. For comparison I also have a cli version of the wasm with a preopened directory where I can see anopenat
call to the directory I specified instrace
, and the component prints out the contents of the directory as expected.I also tried many variations of passing
-Scli=y -Spreview2=y
with no fix to directory access.Adding
-Dlogging=y
does not yield anything useful.My assumption that
wasmtime serve
should honour the--dir
flag is based on the following:wasmtime serve
#8279wasmtime serve
to apply-S common
by default #8086It looks like common's
self.dirs
is not getting populated from the command line argument.The text was updated successfully, but these errors were encountered: