Support statically linked addons

オープン
#499 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cmake, react-native, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

enhancement Linking 🔗

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_v1 symbol, so two addons would collide when linked into one binary.
  • Registration: how an addon registers itself and under what name, given that napi_module_register is deprecated.
  • Build: what cmake-rn and ferric produce, and how link gets it into the app, since today's prebuilds are dynamic libraries.
  • Node-API symbols: how a static addon reaches Node-API, with weak-node-api or a Hermes stub.
主要言語
TypeScript
スター
206
フォーク
12
平均マージ
4時間 35分
マージ済み PR(30日)
9

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstackincubator/react-native-node-api のほかの issue

callstackincubator/react-native-node-api の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。