-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[embind] Export embind exports as ESM exports for MODULARIZE=instance. #23404
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
[embind] Export embind exports as ESM exports for MODULARIZE=instance. #23404
Conversation
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.
To be clear this only works in AOT mode? What happens in non-AOT mode?
In non-aot mode, the user would have to get the bindings off the module object from init. e.g. const module = await init();
module.foo(); We could require that modularize instance + embind only works with embind_aot, or enable embind_aot in instance mode by default. I lean towards the latter. |
f66d559
to
28d8a57
Compare
Using the embind AOT mode we can generate a list of all the embind bindings and export them as ES module exports.
28d8a57
to
4ba6484
Compare
I've updated this to work with the changes with |
Using the embind AOT mode we can generate a list of all the embind bindings and export them as ES module exports.