Skip to content

Commit

Permalink
Migrate from ffi-napi to koffi (#203) (#204)
Browse files Browse the repository at this point in the history
Co-authored-by: RobbertProost <[email protected]>
  • Loading branch information
alexcamposruiz and RobbertProost authored Jun 5, 2024
1 parent f920b82 commit bcbcc8f
Show file tree
Hide file tree
Showing 9 changed files with 649 additions and 1,753 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ The `examples/nodejs` directory provides several examples:
## Dependencies

RTI Connector for JavaScript has the following dependencies, which are also listed in `package.json`:
* [ref-napi](https://www.npmjs.com/package/ref-napi): turns Buffer instances into "pointers"
* [ref-struct-napi](https://www.npmjs.com/package/ref-struct-napi): create ABI-compilant "Struct" instances on top of Buffers
* [ffi-napi](https://www.npmjs.com/package/ffi-napi): used for loading and calling dynamic libraries using pure JavaScript
* [koffi](https://koffi.dev/): used for loading and calling dynamic libraries using pure JavaScript
* [events](https://www.npmjs.com/package/events): used for the 'EventEmitter' (legacy implementation of RTI Connector)

Additionally to run the `web_socket` example, [socket.io](https://github.com/Automattic/socket.io) and [OpenLayers](https://openlayers.org) are required.

Additional dependencies are required to run the unit tests and some of the examples. Please see the README files in the appropriate directory.

### Python dependency

Some of the dependencies are shipped as source code and use [node-gyp](https://github.com/nodejs/node-gyp) to be compiled locally. `node-gyp` requires Python 2.7 and does not work with Python 3. The requirements for `node-gyp` can be found at:
* [unix](https://github.com/nodejs/node-gyp#on-unix)
* [darwin](https://github.com/nodejs/node-gyp#on-macos)
* [windows](https://github.com/nodejs/node-gyp#on-windows)

### C/C++ compiler dependency

The dependency [ref](https://www.npmjs.com/package/ref) is shipped as source code and requires a C++11 compiler.
Expand Down
17 changes: 1 addition & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@ Dependencies

RTI Connector for JavaScript has the following dependencies, which are
also listed in ``package.json``: \*
`ref-napi <https://www.npmjs.com/package/ref-napi>`__: turns Buffer
instances into "pointers" \*
`ref-struct-napi <https://www.npmjs.com/package/ref-struct-napi>`__:
create ABI-compilant "Struct" instances on top of Buffers \*
`ffi-napi <https://www.npmjs.com/package/ffi-napi>`__: used for loading
`koffi <https://koffi.dev/>`__: used for loading
and calling dynamic libraries using pure JavaScript \*
`events <https://www.npmjs.com/package/events>`__: used for the
'EventEmitter' (legacy implementation of RTI Connector)
Expand All @@ -50,17 +46,6 @@ Additionally to run the ``web_socket`` example,
Additional dependencies are required to run the unit tests and some of
the examples. Please see the README files in the appropriate directory.

Python dependency
~~~~~~~~~~~~~~~~~

Some of the dependencies are shipped as source code and use
`node-gyp <https://github.com/nodejs/node-gyp>`__ to be compiled
locally. ``node-gyp`` requires Python 2.7 and does not work with Python
3. The requirements for ``node-gyp`` can be found at: \*
`unix <https://github.com/nodejs/node-gyp#on-unix>`__ \*
`darwin <https://github.com/nodejs/node-gyp#on-macos>`__ \*
`windows <https://github.com/nodejs/node-gyp#on-windows>`__

C/C++ compiler dependency
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Loading

0 comments on commit bcbcc8f

Please sign in to comment.