Replace `prebuild` + `prebuild-install` with `prebuildify` + `node-gyp-build` as recommended in `prebuild-install` README
I was recently doing a deep dive to understand how isolated-vm's prebuilts work; and see that it currently uses prebuild + prebuild-install:
- https://github.com/prebuild/prebuild
-
A command line tool for easily doing prebuilds for multiple version of node on a specific platform
-
- https://github.com/prebuild/prebuild-install
-
Minimal install client for prebuilds.
-
But when I was looking at the prebuild-install README, it suggests the following:
- https://github.com/prebuild/prebuild-install#note
-
Instead of
prebuildpaired withprebuild-install, we recommendprebuildifypaired withnode-gyp-build.
-
Presumably recommended based on this aspect (from the prebuildify README):
With
prebuildify, all prebuilt binaries are shipped inside the package that is published to npm, which means there's no need for a separate download step like you find inprebuild. The irony of this approach is that it is faster to download all prebuilt binaries for every platform when they are bundled than it is to download a single prebuilt binary as an install script.Always use prebuildify --@mafintosh
Using different node packages but the same compiler won't solve anything.
Based on my limited experience trying to get the windows build working, I now realize why it is such a pain to handle, especially on Windows. The MSVC++ compiler is completely different than the GNU C compiler. While they might support both support the C++20 languages specification, they each have their quirks. I noticed MSVC++ behaves slightly different in certain cases, and it's not just the compiler, but also the linker?
Besides the compiler, NodeJS changes its APIs constantly, so each version needs to be treated differently. I immediately gave up on node 20 as well 😂
Using different node packages but the same compiler won't solve anything.
@alumni Yeah, fair enough. I wasn't sure if it would be relevant for the specific windows related build issue stuff; but I raised this issue in particular more specifically as it seems to be the recommended modern replacement of the current prebuild tooling used.
I have nothing against this approach but tweaking the distribution infrastructure won't affect the supported platforms.