Support statically linked addons

Abierto
#499 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cmake, react-native, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
206
Forks
12
Merge medio
4 h 35 min
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de callstackincubator/react-native-node-api

Todos los issues de callstackincubator/react-native-node-api

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.