Skip to content

Remove wasm-tools warning for Golang#284

Merged
vados-cosmonic merged 2 commits intobytecodealliance:mainfrom
alexcasalboni:main
Jul 22, 2025
Merged

Remove wasm-tools warning for Golang#284
vados-cosmonic merged 2 commits intobytecodealliance:mainfrom
alexcasalboni:main

Conversation

@alexcasalboni
Copy link

This has been fixed in bytecodealliance/go-modules#298

Also see the discussion in bytecodealliance/go-modules#297

I've re-tested today and it's working fine with the latest too (wasm-tools@1.235.0) 👌

@vados-cosmonic
Copy link
Collaborator

Hey @alexcasalboni thanks for making this PR -- could we add something that tells people which version this works with? It would be useful to know the lower bound on the version they should be using until we're well clear of the broken versions.

@alexcasalboni
Copy link
Author

alexcasalboni commented Jul 21, 2025

@vados-cosmonic afaik, the issue this warning mentions was just a temporary issue with wit-bindgen-go and its own dependencies.

So this is fixed since wit-bindgen-go@v0.6.2 and all new versions should be bundled with a vendored wasm-tools, instead of relying on the system one.

@vados-cosmonic
Copy link
Collaborator

Yep, that's right -- the fix was made in wit-bindgen-go right? The situation I want to avoid is someone with an older version of wit-bindgen-go running into this issue and being confused!

A line like "Please ensure you're using version wit-bindgen-go v0.6.2 or above" should make it easy to avoid that situation. If this situation is incredibly unlikely then we can skip it though.

@alexcasalboni
Copy link
Author

Yes correct, the fix was made in wit-bindgen-go, back in March.

I was looking for a way to pinpoint the wit-bindgen-go version, but this Go guide is now based on Go 1.24 and suggests using the new go tool approach, which doesn't support specifying a tool version.

So my understanding is that we're ok with saying "Automatically use the latest wit-bindgen-go version and that should be compatible with all wasm-tools versions" 😄 If that's not the case, we should switch back to using a regular dependency (not an unversioned tool).

Just in case, I've done some additional tests to confirm that the latest version of wit-bindgen-go works fine with all wasm-tools versions (even the old 1.225.0, 1.226.0, 1.227.0, etc.). And surprisingly, you still need to install it yourself (even if the v0.6.0 release mentions that "wasm-tools is now vendored as a WebAssembly module, executed using Wazero."). So I'm a bit confused 🤔

@ydnar could you please share your thoughts here? I think I am missing something important 🙏

@alexcasalboni
Copy link
Author

Update: I have realised that wit-bindgen-go does come with its own vendored wasm-tools, but unfortunately tinygo still requires you to install a local version.

See here: tinygo-org/tinygo#4587

@vados-cosmonic so the warning I'm trying to remove isn't about wit-bindgen-go anymore. It should be about tinygo and the potential version mismatch. Not sure what's the best strategy here.

Thoughts?

@vados-cosmonic
Copy link
Collaborator

Hmmm OK, so we'd probably want to go through the guide with newer versions of all the tools and make sure things still work smoothly...

Along with that, we'd probably want to include a warning that points to versioning being somewhat touchy -- more to encourage people to make sure they have the exact versions (or newer) that we're using in the guide.

How does that sound?

@alexcasalboni
Copy link
Author

Agreed 👍

We could keep a warning like this:

> [!WARNING]
> `wit-bindgen-go` comes with its own `wasm-tools` vendored version, but tinygo still requires you to install it.
> Even if unlikely, this could lead to version mismatch when using older versions of `wasm-tools`.
> Please make sure to keep your local `wasm-tools` udpated, should you encounter any issues.
>
> If using the Rust toolchain to install `wasm-tools`, it can be installed like so:
> `cargo install --locked wasm-tools@1.235.0 --force`
> or via cargo binstall:
> `cargo binstall wasm-tools@1.235.0`

(please feel free to rephase)

@vados-cosmonic
Copy link
Collaborator

That's excellent! If you want to put it in this PR that would be great -- then we can replace the current warning with this one.

@alexcasalboni
Copy link
Author

Updated :)

Copy link
Collaborator

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update, @alexcasalboni !

@vados-cosmonic vados-cosmonic merged commit 783f916 into bytecodealliance:main Jul 22, 2025
8 checks passed
catamorphism pushed a commit to catamorphism/component-docs that referenced this pull request Aug 12, 2025
…#284)

* remove wasm-tools warning for Golang

* update wasm-tools warning for Golang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants