Change from ffi to ffi-napi since the former seems unsupported

This should also fix installation problem of node-gyp in CI
This commit is contained in:
John J. Camilleri
2021-10-05 01:02:02 +02:00
parent 634508eaa8
commit ca2f2bfd89
6 changed files with 425 additions and 343 deletions

View File

@@ -1,24 +1,32 @@
# JavaScript (Node.js) bindings to PGF runtime
## Pre-requisites
## Using in your project
1. You must have installed the PGF C runtime (see `../c/README.md`)
2. You may need to set the environment variable `LD_LIBRARY_PATH=/usr/local/lib`
3. Add to your project the usual way with:
```
npm install path/to/this/folder
```
4. Or install globally with:
```
npm install --global .
```
## Building the package (development)
**Pre-requisites**
```
npm install
```
You might need this:
```
PYTHON=/usr/bin/python2 npm install -g node-gyp
```
## Installation
**Compiling**
```
npm run build
```
## Running tests
**Running tests**
```
npm run test
```