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

Plugin infrastructure #66

Open
j-f1 opened this issue Sep 20, 2020 · 0 comments
Open

Plugin infrastructure #66

j-f1 opened this issue Sep 20, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@j-f1
Copy link
Member

j-f1 commented Sep 20, 2020

Currently, JavaScript-based features must be directly implemented in JavaScriptKit to be able to access important features like the heap and the JSValue parsing/serializing routines. This means that less-common things like TypedArray or potential Combine-Promise integration (see #62) would have to increase the bundle size for everyone. One solution to this would be defining some sort of public JS-side API that allows providing custom functions to the WASM runtime. As long as we encourage users of this API to prefix their methods there should be no collision issues.

It would be nice to restructure JavaScriptKit itself to make use of the plugin API too:

  • swjs_core: release
  • swjs_object: get_prop, set_prop, get_subscript, set_subscript, instanceof
  • swjs_string: decode, encode, load
  • swjs_function: call, apply, call_new, create
  • swjs_typedarray: create
@j-f1 j-f1 added the enhancement New feature or request label Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant