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

Ergonomics of the Guest trait implementation from the generated Rust bindings from WIT #336

Open
greenhat opened this issue Oct 8, 2024 · 0 comments
Assignees
Milestone

Comments

@greenhat
Copy link
Contributor

greenhat commented Oct 8, 2024

The Guest trait in the generated Rust bindings defines the exported interface of the WIT world. It's the Rust variant of the exported WIT interface, and the user needs to implement it.
The trait name Guest is rooted in the host/guest tandem of the Wasm CM. It's hard-coded in the wit-bingen.
We could make it configurable and try to push it to the upstream.

Another option would be to try to hide the impl Guest behind the macro on the user's account struct. We need to somehow preserve the DX of adding new functions to the WIT interface, e.g. "implement missing..." action, etc.

Investigate cxx crate and bridge macro along with generating the WIT interface from user's Rust code and hiding the WIT interfaces and their generated Rust bindings completely.

@greenhat greenhat added this to the Beta 1 milestone Oct 8, 2024
@greenhat greenhat self-assigned this Oct 8, 2024
@greenhat greenhat changed the title Ergonomics of the Guest trait implementation in the generated Rust bindings from WIT Ergonomics of the Guest trait implementation from the generated Rust bindings from WIT Oct 8, 2024
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

No branches or pull requests

1 participant