-
Notifications
You must be signed in to change notification settings - Fork 54
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
#73 fp bindgen wasm #361
Closed
Closed
#73 fp bindgen wasm #361
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
af6c525
to
5ba9874
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#73
fp-bindgen is a tool for creating wasm plugin abstractions. It helps data and functions to pass the memory boundary, from host to plugin.
It's a really cool project. I've been playing with it for a bit and got it working.
Passing
Store
across the memory boundaryThis is probably the hardest part of it all. I want to be able to do things like
Store.query
orquery(store)
from within a plugin. To do this, I need a Store available in the plugin. I want to prevent re-creating all theStore
methods in the host (e.g. write aquery
andcommit
andget_resource
function that the host makes available), which is how it is usually done in fp-bindgen examples.One of the current limitations of fp-bindgen is sending host context to a runtime. When that is solved, I can start working on this issue.
One possible implementation is a new
impl Storelike
that is similar toDb
. Or maybe we can moveDb
across the memory boundary without too much effort? It is cloned for every request, so it may not be that hard.PR Checklist: