-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
WASI components import wasi:cli/environemnt
and wasi:cli/exit
when not being used
#107405
Comments
Note that you can specify |
It is by design that the actual imports is a superset of "used" imports (including from other worlds). I expect that in the long term, as both WASI and .NET's use of it mature, this set will only grow.
|
Tagging subscribers to 'arch-wasm': @lewing |
I guess I am not following this fully. In this case the component implements wasi-http not wasi-cli. Why would it have wasi-cli imports if it's not using it? |
The .NET runtime assumes that it has access to the full "system library"; it differentiates these libraries by the OS component of the RID. Since we only have
There is a path somewhere (which could be dynamically unreachable) that eventually calls the imports. Consider e. g. that a lot of knobs that .NET exposes are configured via environment variables. |
problem statement
When building a component for
wasi:http
when running in wasmtime I get the following error:When inspecting the component built I see imports for
wasi:cli/environemnt
andwasi:cli/exit
, even though I only built against thewasi:http
world:I was able to work around it by telling wasmtime to provide the cli imports:
question
Should these imports be included in the component? Is there a way to detect during compilation if the env/exit are being used and not include them?
Discussion in Bytecode Alliance Zulip: https://bytecodealliance.zulipchat.com/#narrow/stream/407028-C.23.2F.2Enet-collaboration/topic/missing.20implementation.20was.20not.20found.20in.20linker
example
https://github.com/jsturtevant/wasi-http-oci
The text was updated successfully, but these errors were encountered: