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

[JS] Move from embind to manual bindings #1507

Open
NickGerleman opened this issue Dec 10, 2023 · 1 comment
Open

[JS] Move from embind to manual bindings #1507

NickGerleman opened this issue Dec 10, 2023 · 1 comment

Comments

@NickGerleman
Copy link
Contributor

embind is convenient but not ideal

  1. Its structure makes it hard to implement garbage collection vs finalization registry because we can’t differentiate JS refererence Vs native pointer
  2. It bloats the binary/bundle and adds required runtime support. Goes in the opposite direction of being able to generate portable wasm targeting only WASI.
  3. Our patching of its interface is hard to reason about or add to.

We should instead add the code for the object representation and have it call Yoga C APIs directly, like the JNI bindings.

@NickGerleman
Copy link
Contributor Author

This isn’t something I’m going to prioritize, but might be worth picking up as a next step in evolving the bindings, especially if standalone wasm es modules become well supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant