Skip to content

Revise Go language support section#311

Merged
vados-cosmonic merged 4 commits intobytecodealliance:mainfrom
catamorphism:language-support-go
Sep 9, 2025
Merged

Revise Go language support section#311
vados-cosmonic merged 4 commits intobytecodealliance:mainfrom
catamorphism:language-support-go

Conversation

@catamorphism
Copy link
Contributor

Added more details where necessary. Factored code examples out into separate files and included them.

Made the "Testing the add component" section consistent with other examples involving the example host.

Added more details where necessary. Factored code examples out
into separate files and included them.

Made the "Testing the add component" section consistent
with other examples involving the example host.
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.

LGTM 🚀

Just a few nits, and this should be ready to go!

catamorphism and others added 2 commits September 8, 2025 17:52
Co-authored-by: Victor Adossi <123968127+vados-cosmonic@users.noreply.github.com>
@vados-cosmonic vados-cosmonic self-requested a review September 9, 2025 19:40
@vados-cosmonic vados-cosmonic merged commit d058d0c into bytecodealliance:main Sep 9, 2025
8 checks passed

Running the `wkg wit fetch` command will resolve the imports and populate your `wit` folder with all relevant
imported namespaces and packages.
Running the `wkg wit build` command encodes the WIT into the Component Model binary format.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The title of this section says it's about "resolve and download imports" so as a reader I have questions about why I am doing this encoding malarkey. After all, "resolve and download" is what fetch does, so why am I not doing that?

Looking ahead to section 3, I am guessing it is something like: in order to use go tool wit-bindgen-go, we must have a package (that is addressable using package notation) rather than a WIT text tree: therefore we must do a wit build rather than a wit fetch.

Is that correct? That go tool wit-bindgen-go can't operate on the text tree, only on a binary package reference? I'm a bit surprised by that but the one thing I do know about Go is its infinite capacity to surprise me! grin

If that is the reason, I'd suggest explicitly explaining this context, because reading this now the build step feels a bit arbitrary, likely as a result of partial updates as the Go tooling has changed over time...

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.

3 participants