Skip to content

Commit 65f36f3

Browse files
authored
[Docs] Mention emnapi in documentation (#17515)
1 parent a80b21a commit 65f36f3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

site/source/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,16 @@ for defining the binding:
798798
of one tool over the other will usually be based on which is the most
799799
natural fit for the project and its build system.
800800

801+
.. _interacting-with-code-emnapi:
802+
803+
Binding C/C++ and JavaScript - Node-API
804+
===============================================================
805+
806+
`Emnapi`_ is an unofficial `Node-API`_ implementation which can be used
807+
on Emscripten. If you would like to port existing Node-API addon to WebAssembly
808+
or compile the same binding code to both Node.js native addon and WebAssembly,
809+
you can give it a try. See `Emnapi documentation`_ for more details.
810+
801811
.. _library.js: https://github.com/emscripten-core/emscripten/blob/main/src/library.js
802812
.. _test_js_libraries: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L5043
803813
.. _src/deps_info.json: https://github.com/emscripten-core/emscripten/blob/main/src/deps_info.json
@@ -808,3 +818,6 @@ for defining the binding:
808818
.. _test/test_core.py: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L4597
809819
.. _Box2D: https://github.com/kripken/box2d.js/#box2djs
810820
.. _Bullet: https://github.com/kripken/ammo.js/#ammojs
821+
.. _Emnapi: https://github.com/toyobayashi/emnapi
822+
.. _Node-API: https://nodejs.org/dist/latest/docs/api/n-api.html
823+
.. _Emnapi documentation: https://emnapi-docs.vercel.app/guide/getting-started.html

0 commit comments

Comments
 (0)