Support statically linked addons
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 8/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cmake, react-native, typescript
- Domain
- build-system, infrastructure
Research direction
This is a design discussion, not a patch: the issue asks how addons can be linked statically rather than loaded via dlopen (see #498). Read the four questions in the body (entry-point collisions, registration, the cmake-rn and ferric build outputs, and Node-API symbol resolution through weak-node-api or a Hermes stub) and the linked #263. Done means a written proposal that answers them, not code.
Written by the indexing model from the issue text.
Description
Tracks interest in addons statically linked into the app, as opposed to loaded from a dynamic library. Node.js offers this through process._linkedBinding("foo"), for addons registered at startup. Originally raised in #263.
This isn't planned. It needs significant design work, so please add a 👍 or describe your use case if you'd need it.
It doesn't fit dlopen(module, filename) (#498), because there's no library to open. Some of the questions a design would have to answer:
- Entry points: every addon exports the same
napi_register_module_v1symbol, so two addons would collide when linked into one binary. - Registration: how an addon registers itself and under what name, given that
napi_module_registeris deprecated. - Build: what
cmake-rnandferricproduce, and howlinkgets it into the app, since today's prebuilds are dynamic libraries. - Node-API symbols: how a static addon reaches Node-API, with
weak-node-apior a Hermes stub.
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 12
- Avg merge
- 4h 8m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from callstackincubator/react-native-node-api
-
Android 🤖
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
Sanity check of Hermes source directory via environment variable, when building Android projectsOpenAndroid 🤖 good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
callstackincubator/react-native-node-api#163 · 1 comment ·
-
enhancement good first issue gyp-to-cmake
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
callstackincubator/react-native-node-api#161 · 3 comments · 1 reaction ·
-
enhancement Linking 🔗
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Prebuilt node-api facade for published addonsMay be free again @kraenhansen claimed this 32 days ago, and no pull request is open. Openenhancement Host 🏡 Linking 🔗
callstackincubator/react-native-node-api#496 · 1 assignee ·
All issues in callstackincubator/react-native-node-api
Similar issues
-
prio:low scope:hud
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
OliverRomhagen/vrigstad-joyride#953 ·
Maintainers usually reply within 1 day
-
review-followup
Difficulty 1/5 Under an hour Newbie friendliness 92/100
griffinwork40/agent-afk#5446 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
kacper-szewczyk/Ticknest#346 ·
Maintainers usually reply within 1 day
-
echarts geo: a GeoJSON URL that returns 200 with a body that is not JSON is fetched on each refreshOpenbug plugin/echarts/geo
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Yeachan-Heo/gajae-code#8230 ·
Maintainers usually reply within 1 day