-
Notifications
You must be signed in to change notification settings - Fork 34
feat(wit-bindgen-rust) Implement resource handle support for wit-bindgen-wrpc
#108
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
feat(wit-bindgen-rust) Implement resource handle support for wit-bindgen-wrpc
#108
Conversation
…n` + resource handle refactoring
I think the resource handlers will have to implement |
…emove old commentss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This actually looks pretty good to me!
Closes #15. This PR implements resource support by representing resources as opaque handles. The handles are implemented as lists of bytes wrapped
ResourceOwn<T>
andResourceBorrow<T>
as outlined in #101.This PR will supersede #82. This was implemented on new branch due to the significant differences between the opaque handle based approach for representing resources used here vs #82's approach that took a much more prescriptive approach to resource handling.
An example of resources being used with wRPC can be founding in the
rust_bindgen
test case intests/rust.rs
.Other than revisions, I believe the main todo item left for this is to decide how to handle drops. I'm a little unsure if resource handlers should be forced to serve a
drop
method that clients can call, or if wRPC resource hosts and clients should implement their own drop methods that they can call on their own basis. @rvolosatovs thoughts?