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

Go bindgen todos #499

Open
2 of 11 tasks
Mossaka opened this issue Feb 13, 2023 · 5 comments
Open
2 of 11 tasks

Go bindgen todos #499

Mossaka opened this issue Feb 13, 2023 · 5 comments
Assignees
Labels
gen-tinygo Related to the TinyGo bindings generator

Comments

@Mossaka
Copy link
Member

Mossaka commented Feb 13, 2023

I would like to initiate a new tracking issue to categorize all the necessary steps in improving the Go bindgen experience. These steps will be divided into three categories: short-term, middle-term, and long-term. The duration of each term is not precisely defined at this point, but short-term goals would be tackled immediately after the merge of PR #471 into the main branch. Long-term goals are expected to be completed beyond 2023, while middle-term goals fall somewhere in between.

Short Term

Middle Term

Long Term

@alexcrichton alexcrichton added the gen-tinygo Related to the TinyGo bindings generator label Feb 13, 2023
@Mossaka
Copy link
Member Author

Mossaka commented Feb 16, 2023

Performance-wise, I have done some rudimentary benchmark tests on a standard HTTP server that dispatches each HTTP request to a wasm component compiled from Rust and TinyGo. Here is the result:

Rust

image

TinyGo

image

You can see that the Rust compiled Wasm component's throughput is three times that of TinyGo. I suspect that the performance difference largely is contributed by the double copy of memory in type conversion between Go and C.

@Mossaka Mossaka self-assigned this Feb 17, 2023
@patrickhuber
Copy link

I've done some porting of the python component model MVP to pure go here: https://github.com/patrickhuber/go-wasm/tree/6015b8d07aaa1fc902fee44b01d1ebd6fded3d65/abi

More tests are needed for records, variants etc but strings and basic types are working.

@Mossaka
Copy link
Member Author

Mossaka commented Jun 8, 2023

@patrickhuber glad to hear! Let me know if you ran into any issues.

@patrickhuber
Copy link

patrickhuber commented Jul 15, 2023

I completed the unit tests suite included in the component model MVP. I'm going to try to replace some of the generated code with the go abi I created and see what challenges I run into. Latest here: https://github.com/patrickhuber/go-wasm/tree/main/abi

@Mossaka
Copy link
Member Author

Mossaka commented Jul 20, 2023

Awesome!! @patrickhuber

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gen-tinygo Related to the TinyGo bindings generator
Projects
None yet
Development

No branches or pull requests

3 participants