You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below are a few clarifying questions and then a high-level plan for the docs changes.
Clarifying questions
Where should the main requirement live?
Would you prefer the explicit “you must link against weak-node-api” requirement to live primarily in docs/PREBUILDS.md (with a short pointer from the weak-node-api README), or should both documents carry a small self-contained explanation?
Platform scope
Should we describe linking against weak-node-api as:
primarily an Android requirement (since the README.md explains the Android dynamic linker issue), or
a requirement for all React Native prebuilds (*.android.node and *.apple.node) going forward?
Build tooling vs. custom setups
For users relying on the recommended build setups/templates in this project, is linking to weak-node-api already handled for them, or do you expect addon authors to add the link dependency manually?
If templates handle it, I’ll phrase it as: “If you use the provided templates, you’re covered; custom setups must ensure they link against weak-node-api.”
If not, I’ll make the requirement more explicit and concrete.
How specific about library naming?
Do you want docs/PREBUILDS.md to mention any canonical library / framework names per platform, or should it stay higher-level (e.g. “link your addon against the weak-node-api library shipped by react-native-node-api”) and leave exact names to platform-specific build docs?
Troubleshooting section
Would you like a small troubleshooting note (e.g. “undefined napi_* symbols → check you’re linking against weak-node-api”), or should PREBUILDS.md stay strictly about structure and requirements?
High-level plan for docs changes
Assuming the above, here’s how I’d approach the PR:
Update docs/PREBUILDS.md: add a “Linking against `weak-node-api`” section
Explicitly state that prebuilt Node-API modules for React Native must link against weak-node-api (with platform scope per your answer).
Briefly explain why (addons depend only on the Node-API surface; the host/Hermes provide the implementation at runtime).
Mention how this interacts with the recommended build tooling (templates vs. custom setups).
Link to the weak-node-api README for background.
Update weak-node-api/README.md: add a short “Usage with React Native prebuilds” subsection
Note that addons targeting React Native should link against weak-node-api rather than directly against Hermes / host symbols.
Point readers to docs/PREBUILDS.md for the prebuild naming and directory structure.
(Optional) Add a troubleshooting snippet in docs/PREBUILDS.md
Add a short note for common symbol/link errors and direct people to verify that their prebuilds are correctly linked against weak-node-api.
If this direction looks good, I’ll go ahead and implement it according to your answers.
Sorry for the wait here - I think it would make sense to hold back on both this and #156 as I expect things will be shifting quite a bit this year. I'll update this issue when it stabilise a bit more.
Thanks again for your interest in improving this! Please consider joining the "react-native-node-api" on Callstack's discord to follow along and share any ideas you might have 💙
Activity
reckziegelwilliam commentedon Nov 30, 2025
Hi! I'd like to add docs on weak-node-api.
kraenhansen commentedon Nov 30, 2025
@reckziegelwilliam that would be great 👍
I'd like for you to:
When done, I'll assign the issue to you, review and merge according to your plan.
reckziegelwilliam commentedon Nov 30, 2025
Hi @kraenhansen, thanks for the guidance 🙌
I’ve read through:
weak-node-api’sREADME.mddocs/PREBUILDS.mdin this repoBelow are a few clarifying questions and then a high-level plan for the docs changes.
Clarifying questions
Where should the main requirement live?
Would you prefer the explicit “you must link against
weak-node-api” requirement to live primarily indocs/PREBUILDS.md(with a short pointer from theweak-node-apiREADME), or should both documents carry a small self-contained explanation?Platform scope
Should we describe linking against
weak-node-apias:README.mdexplains the Android dynamic linker issue), or*.android.nodeand*.apple.node) going forward?Build tooling vs. custom setups
For users relying on the recommended build setups/templates in this project, is linking to
weak-node-apialready handled for them, or do you expect addon authors to add the link dependency manually?weak-node-api.”How specific about library naming?
Do you want
docs/PREBUILDS.mdto mention any canonical library / framework names per platform, or should it stay higher-level (e.g. “link your addon against theweak-node-apilibrary shipped byreact-native-node-api”) and leave exact names to platform-specific build docs?Troubleshooting section
Would you like a small troubleshooting note (e.g. “undefined
napi_*symbols → check you’re linking againstweak-node-api”), or shouldPREBUILDS.mdstay strictly about structure and requirements?High-level plan for docs changes
Assuming the above, here’s how I’d approach the PR:
Update
docs/PREBUILDS.md: add a “Linking against `weak-node-api`” sectionweak-node-api(with platform scope per your answer).weak-node-apiREADME for background.Update
weak-node-api/README.md: add a short “Usage with React Native prebuilds” subsectionweak-node-apirather than directly against Hermes / host symbols.docs/PREBUILDS.mdfor the prebuild naming and directory structure.(Optional) Add a troubleshooting snippet in
docs/PREBUILDS.mdweak-node-api.If this direction looks good, I’ll go ahead and implement it according to your answers.
kraenhansen commentedon Dec 1, 2025
Actually, in the context of nodejs/node#60916 (comment) I think we should hold back on solving this issue for now.
reckziegelwilliam commentedon Dec 8, 2025
@kraenhansen seems like progress has been made on this...? Otherwise, does hold also apply to example app as well?Contribute an Expo Example App #156
kraenhansen commentedon Jan 14, 2026
Sorry for the wait here - I think it would make sense to hold back on both this and #156 as I expect things will be shifting quite a bit this year. I'll update this issue when it stabilise a bit more.
Thanks again for your interest in improving this! Please consider joining the "react-native-node-api" on Callstack's discord to follow along and share any ideas you might have 💙