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

Electron and NodeJS C++ addon support #2

Open
hsjoberg opened this issue Sep 10, 2024 · 1 comment
Open

Electron and NodeJS C++ addon support #2

hsjoberg opened this issue Sep 10, 2024 · 1 comment

Comments

@hsjoberg
Copy link
Owner

hsjoberg commented Sep 10, 2024

This actually works. https://github.com/hsjoberg/node-addon-lnd
You can create a NodeJS C++ addon that also talks to the CGO falafel bindings.
This can then be used to create a react-native app for Linux using Electron and react-native-web.

The NodeJS C++ addon needs to expose the same core API as the C++ TurboModule.

When using Electron Forge, it will automatically compile the NodeJS C++ addon for Electron env by just reading the lib's binding.gyp file.

@hsjoberg
Copy link
Owner Author

hsjoberg commented Sep 10, 2024

One unanswered question is if we should have a helper to expose all gRPC methods to the electron bridge. Otherwise the user has to set this up themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant