-
Notifications
You must be signed in to change notification settings - Fork 103
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
[library] quickjs-emscripten-sync - easily pass objects between host and guest #39
Comments
@rot1024 This is awesome! Thank you for sharing. I skimmed the code briefly and didn't see anything suspect (although without comments I didn't understand VMMap at first glance). Great job on the README. I really like that you included security warnings and example.
My requirement to include buinding in quickjs-emscripten directly is that the binding API requires consumers to consider security. It's a tricky design question. Ideally, the approach would use an allow-list, with only primitive values allowed by default. It would be up to the consumer to specify the properties of objects that could be marshalled or synced. Your approach with |
Thank you for reply. Yes, security is a top priority. It would certainly be beneficial to impose a strict security policy by default. I'd like to modify it that way soon (for example, it could be serialized to JSON by default, and allowed to be exchanged through proxies in a whitelist).
In fact, I don't think Most of all, I think disabling marshalling by default and allowing it in a whitelist would be most beneficial to increase safety. Thank you very much for your useful feedback and I look forward to seeing further evolution of quickjs-emscripten in the future. |
Thank you for creating this wonderful library.
I have developed "quickjs-emscripten-sync" to facilitate the passing of objects between QuickJS VMs and hosts.
https://github.com/reearth/quickjs-emscripten-sync
It is using a limited API to exchange objects, which may not be efficient, but It is currently able to pass objects smoothly.
In the TODO of quickjs-emscripten, it says that they are planning to support binding of classes and other objects. This implementation may be useful at that time.
The text was updated successfully, but these errors were encountered: