[JS] Move from embind to manual bindings
Open
Nobody has claimed this yet.
JavaScript
- Dominant language
- C++
- Stars
- 18.9k
- Forks
- 1.6k
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
embind is convenient but not ideal
- Its structure makes it hard to implement garbage collection vs finalization registry because we can’t differentiate JS refererence Vs native pointer
- 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.
- 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the existing embind interface with the JNI bindings and the Yoga C APIs mentioned in the issue. The work is done when the JavaScript object representation calls the Yoga C APIs directly and no longer depends on embind's interface and runtime support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript, wasm
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100