Use go.bytecodealliance.org/cmd/wit-bindgen-go
to generate go bindings given WIT interfaces
#2
Labels
enhancement
New feature or request
Hey there, I just want to throw an idea here and see if you like it.
wit-bindgen 0.8.0
release has the newest WIT syntax that comes with a go-bindgen, which I've contributed to. In addition, it seems to me that preview2 WIT interfaces in Spin are also updated to the newest syntax. It feels nautral to me that we should be starting usingwit-bindgen-go
to generate go bindings and then build a go SDK on top of them. It reduces maintainence cost, and reduces the time to write the bindings manually. The benefit of a SDk is that this could go completely transparent to the users of the Spin Go SDKs.Does this sound like a good idea?
Disclaimer: I am the author of wit-bindgen-go crate in wit-bindgen
Update
https://pkg.go.dev/go.bytecodealliance.org has the new wit-bindgen-go that can generate idiomatic Go bindings without relying on Cgo. This is the one we should use for the Go SDK.
The text was updated successfully, but these errors were encountered: