You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The other problem is how to deliver prebuild binary to users. Downloading it in postinstall script is a common way that most packages do it right now. The problem with this solution is it introduced many other packages to download binary that has not been used by runtime codes. The other problem is some users may not easily download the binary from GitHub/CDN if they are behind a private network (But in most cases, they have a private NPM mirror).
In this package, we choose a better way to solve this problem. We release different npm packages for different platforms. And add it to optionalDependencies before releasing the Major package to npm.
NPM will choose which native package should download from registry automatically. You can see npm dir for details. And you can also run yarn add @napi-rs/package-template to see how it works.
currently @electron/rebuild has support for prebuildify-based layouts:
napi-rs uses a custom scheme for prebuilds:
currently @electron/rebuild has support for prebuildify-based layouts:
rebuild/src/module-type/prebuildify.ts
Lines 33 to 35 in 7b18a69
rebuild/src/module-type/prebuildify.ts
Line 42 in 7b18a69
could something similar be added for napi-rs?
The text was updated successfully, but these errors were encountered: