electron / node-abi

:turtle: :rocket: Get the Node.js and Electron ABI for a given target and runtime
https://www.npmjs.com/node-abi
MIT License
164 stars 58 forks source link

Why build both node and electron for `--napi`? #56

Closed simonbuchan closed 5 years ago

simonbuchan commented 5 years ago

It seems strange that an addon that doesn't use any node headers other than node-api.h (including through napi.h) would have any ABI differences between Node and Electron?

The main thing I guess is that you can't guarantee that it is only using N-API, I myself have written a (test) N-API addon that uses uv.h to get at uv_{get,open}_osfhandle(), but then you can't guarantee it's using N-API at all.

saper commented 5 years ago

Is this meant for this project... ?

mafintosh commented 5 years ago

I think that was meant for prebuildify which uses this.

(We build for both cause electron and node were indeed not abi compatible on windows for a while. Unsure if that has been fixed)

simonbuchan commented 5 years ago

I'm as confused as you! Possibly switched to the wrong tab. I'm not using prebuildify any more, (instead using node-gyp as a library directly) but I suppose it's still a reasonable question, I'm just not sure if it's for prebuildify or electron!