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

Made cli via node #12

Conversation

flickyiyo
Copy link
Contributor

This solves the problem with linux, seems that compiling cross dynamic libraries while using that code in a binary for linux is not that straightforward.
Fixing the issue would not be hard but since we are including the napi-rs to make it node compatible is it maybe worth using node/npm to publish the cli?

@@ -0,0 +1,16 @@
#! /usr/bin/env node
const { goodFences } = require('./index');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is .index here? Is this a generated js bridge from napi? Is some index.node file with the actual node bindings?

Please update with a comment because I am a confused old man👴

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

napi build generates a .node and index.js, index.d.ts files.
The index files are the ones that actually call the .node file but they contain js/ts friendly definitions of all the things annotated with #[napi] in the Rust code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, how old are you?

@flickyiyo flickyiyo merged commit 049b4d0 into u/edgarivanv/enable-js-napi-access Oct 4, 2022
@flickyiyo flickyiyo deleted the u/edgarivanv/replace-native-cli branch October 4, 2022 16:57
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

Successfully merging this pull request may close these issues.

2 participants