-
Notifications
You must be signed in to change notification settings - Fork 104
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: add support for host functions to browser runtime #306
Conversation
zshipko
commented
Apr 6, 2023
- Adds ability to define host functions when creating ExtismPlugins in the browser runtime
- The API is a little simpler than the Rust runtime
- Functions don't handle userdata, userdata should be captured by the function declaration
so you mean userdata should be captured through scope in the closure? |
yeah, I was debating how close it needs to be to the rust runtime. this was much simpler but I could add a userdata argument if you think it would be more usable. |
No this makes sense. It’s more idiomatic to JS
…On Apr 6, 2023 at 5:10 PM -0500, zach ***@***.***>, wrote:
> > Functions don't handle userdata, userdata should be captured by the function declaration
> so you mean userdata should be captured through scope in the closure?
yeah, I was debating how close it needs to be to the rust runtime. this was much simpler but I could add a userdata argument if you think it would be more usable.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
@zshipko i will test tonight |
Looks good to me @zshipko 👍 |
Publishes the latest changes, including #306