Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLI-934] Investigate alternative node-ffi libraries #200

Closed
markphelps opened this issue Mar 26, 2024 · 7 comments
Closed

[FLI-934] Investigate alternative node-ffi libraries #200

markphelps opened this issue Mar 26, 2024 · 7 comments
Labels
help wanted Extra attention is needed
Milestone

Comments

@markphelps
Copy link
Contributor

markphelps commented Mar 26, 2024

See #191

It seems node-ffi-api is not compatible with Node v21+ (node-ffi-napi/node-ffi-napi#267)

We should look into alternative ways to support node v21+ such as https://github.com/Koromix/koffi

FLI-934

@markphelps markphelps changed the title Investigate alternative node-ffi libraries [FLI-934] Investigate alternative node-ffi libraries Mar 26, 2024
@erka
Copy link
Collaborator

erka commented Mar 27, 2024

As an option trying to switch another fork like https://www.npmjs.com/package/@2060.io/ffi-napi

@markphelps markphelps added the help wanted Extra attention is needed label Mar 27, 2024
@piclemx
Copy link

piclemx commented Apr 4, 2024

We also get that with only node 20.12.1.

I guess https://koffi.dev/ or https://github.com/zhangyuang/node-ffi-rs/blob/master/README.md could be interesting.

@piclemx
Copy link

piclemx commented Apr 4, 2024

or the other options will be to used the WASM engine instead of the ffi engine.

@markphelps
Copy link
Contributor Author

markphelps commented Apr 4, 2024

Yah I'm working on the wasm lib now. Very close just working out some kinks.

#226

@markphelps
Copy link
Contributor Author

Fixed in #255

@markphelps
Copy link
Contributor Author

@erka when trying to do the release and run npm run build I get the following:

flipt-client-sdks/flipt-client-node - [node-ffi-release] » npm run build

> @flipt-io/[email protected] build
> tsc

node_modules/@types/ffi-napi/index.d.ts:469:9 - error TS2717: Subsequent property declarations must have the same type.  Property 'ffi_type' must be of type 'PFFI_TYPE | undefined', but here has type 'PFFI_TYPE | undefined'.

469         ffi_type?: PFFI_TYPE | undefined;
            ~~~~~~~~

  node_modules/@2060.io/ffi-napi/types/index.d.ts:448:9
    448         ffi_type?: PFFI_TYPE | undefined;
                ~~~~~~~~
    'ffi_type' was also declared here.


Found 1 error in node_modules/@types/ffi-napi/index.d.ts:469

Seems there is a types mismatch.

@markphelps
Copy link
Contributor Author

Actually, I think I may have fixed it here: https://github.com/flipt-io/flipt-client-sdks/compare/node-ffi-release

can you give it 👀 ?

@markphelps markphelps added this to the v.42 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
Status: Done
Development

No branches or pull requests

3 participants