diff --git a/site/source/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.rst b/site/source/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.rst index 6049992bed1e..107064dd2174 100644 --- a/site/source/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.rst +++ b/site/source/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.rst @@ -798,6 +798,16 @@ for defining the binding: of one tool over the other will usually be based on which is the most natural fit for the project and its build system. +.. _interacting-with-code-emnapi: + +Binding C/C++ and JavaScript - Node-API +=============================================================== + +`Emnapi`_ is an unofficial `Node-API`_ implementation which can be used +on Emscripten. If you would like to port existing Node-API addon to WebAssembly +or compile the same binding code to both Node.js native addon and WebAssembly, +you can give it a try. See `Emnapi documentation`_ for more details. + .. _library.js: https://github.com/emscripten-core/emscripten/blob/main/src/library.js .. _test_js_libraries: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L5043 .. _src/deps_info.json: https://github.com/emscripten-core/emscripten/blob/main/src/deps_info.json @@ -808,3 +818,6 @@ for defining the binding: .. _tests/test_core.py: https://github.com/emscripten-core/emscripten/blob/1.29.12/tests/test_core.py#L4597 .. _Box2D: https://github.com/kripken/box2d.js/#box2djs .. _Bullet: https://github.com/kripken/ammo.js/#ammojs +.. _Emnapi: https://github.com/toyobayashi/emnapi +.. _Node-API: https://nodejs.org/dist/latest/docs/api/n-api.html +.. _Emnapi documentation: https://emnapi-docs.vercel.app/guide/getting-started.html