-
Notifications
You must be signed in to change notification settings - Fork 917
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
wasm-tools/wit-component tinygo wasip2 component mismatch #4587
Comments
@Mossaka ran into this issue working on wasi-http-go. Should we have TinyGo check the version of |
I think that would be great. Happy to get a PR drafted - My main ask would be if you have an idea of where we can easily pin/map wasm-tool version to tinygo version. |
Should it be added to the Homebrew dependencies? |
That would make sense - we can start there. |
this is a difficult question to answer and I don't think anyone has an answer to it. Also wasm-tools has a pre-v1 version meaning that any new minor change could be a breaking change so you can't really always get the latest wasm-tools. My suggestion would be starting to document the versions we know are working, like |
I agree. I will look into finding any similar docs, in the meantime @jeff1010322 and I are thinking we could add something similar to the wasm-opt flows. Do you think this would be a good first-step error if wasm-tools isn't found or a known minimum version isn't met? We are also looking at adding a |
@jeff1010322 and I recently ran into an issue with the version of wasm-tools causing the following error:
This occurred when using tinygo v0.34 and wit-component 0.215 when targeting wasip2.
In order to get this to work, wit-component needed to be set to at least 0.218 and used to embed wasip2 components.
This was uncovered by inspecting the wat generated off a tinygo compiled wasm component
i.e
There are envs for
WASMTOOLS
that can be set https://github.com/tinygo-org/tinygo/blob/release/builder/build.go#L885.However, there seems to still be a potential for a mismatch tinygo wasip2 support and wasm-tools version support.
Would it be acceptable to submodule wasm-tools and default to using the built binary from tinygo, and optionally fall back to the env that is set for wasmtools?
Alternatively, when embedding a wit package/world, could we require a wasm-tools version that is supported and error on mismatch, something similar to the go/llvm required version?
The text was updated successfully, but these errors were encountered: