Skip to content
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

Use wit-bindgen-go to generate go bindings given WIT interfaces #2

Open
Mossaka opened this issue Jun 29, 2023 · 3 comments
Open

Use wit-bindgen-go to generate go bindings given WIT interfaces #2

Mossaka opened this issue Jun 29, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Mossaka
Copy link

Mossaka commented Jun 29, 2023

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 using wit-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

@Mossaka Mossaka changed the title Use wit-bindgen-go to generate go bindings given WIT interfaces Use wit-bindgen-go to generate go bindings given WIT interfaces Jun 29, 2023
@rylev
Copy link
Contributor

rylev commented Jun 30, 2023

I think we'd definitely be in favor of that. We need to make sure that switching to wit-bindgen 0.8 is in working order which is being done in fermyon/spin#1599. I'll try to move the Go SDK over to using the Go support in wit-bindgen in that branch.

@Mossaka
Copy link
Author

Mossaka commented Jun 30, 2023

That's great to hear, @rylev ! Let me know if you ran into any issues with the generated bindings and feel free to raise issues to the wit-bindgen repo.

@michelleN michelleN added the enhancement New feature or request label Jul 19, 2023
@itowlson itowlson transferred this issue from fermyon/spin Mar 21, 2024
@rajatjindal
Copy link
Contributor

I think this issue can be closed now in favor of using wasm-tools-go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🔖 Backlog
Development

Successfully merging a pull request may close this issue.

4 participants