-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Finish Electron Support #271
Conversation
I've been having some trouble with correctly setting the NAPI-feature. In order to determine the NAPI version, we need to build I also think that setting the NAPI version like this is kind of weird. Most users would build a library to target a certain minimum NAPI version. I think it would be better to move the napi features all the way to the top level in [features]
napi7 = [ "napi6" ]
napi6 = [ "napi5" ]
napi5 = [ "napi4" ]
napi4 = [ "napi3" ]
napi3 = [ "napi2" ]
napi2 = [ "napi1" ]
napi1 = []
Then users of this library could choose a minimum NAPI version to support. If a user tried to compile with an napi version they don't support, they would get lots of compile errors as the low level sys functions they would need would not be present. Thoughts @Brooooooklyn? While writing this I thought up a solution for scraping the NAPI version. We could have |
Sounds reasonable.
Looks nice. |
Rebase the latest master branch, and the |
I need to find a good way to send the NAPI version info through the commands on CI now. I will sleep on it. |
latin1 = ["encoding_rs"] | ||
libuv = ["futures"] | ||
serde-json = ["serde", "serde_json"] | ||
tokio_rt = ["futures", "tokio", "once_cell"] | ||
|
||
napi7 = [ "napi6" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if add a feature system-napi
to compatible with the previous behavior? So that you don't need to change the build scripts on CI and people have more choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to avoid that that since thats probably not what most people want, but I agree that it would simplify everything greatly and provide backwards compatibility. I'll make that change and document these features on the readme.
Closing as adding an napi feature will be much easier after #290 lands. Downloading headers will also become necessary, invaliding all work done here. |
This PR will finish the work left from #270.
Jobs left:
The bindgen generated headers are from the currently executing nodejs, not the target engine.