Hey all!
I'm looking to ship a package that's been run through ncc that includes a native dep (zeromq). The current support is great, as I get a nice tidy little collection:
dist$ tree -h
.
โโโ [ 96] build
โ โโโ [ 96] Release
โ โโโ [1.1M] zmq.node
โโโ [ 11] index.d.ts
โโโ [5.1M] index.js
โโโ [ 263] server.d.ts
That zmq.node is specific to the node it's being run on (yes, yes, zeromq is looking to switch to N-API). Luckily, zeromq ships prebuilds for each platform that we can install / have available. We can write a postinstall that will place the zeromq prebuilds in build/Release/zmq.node, that's no problem.
What I'm wondering about is if there could be some way to ease this / create a paved path for working with native deps & ncc.
This is definitely an interesting area that could be explored further. I wonder if there could be a way to integrate something like prebuild (https://github.com/prebuild/prebuild) with such a workflow.
@TooTallNate would value your thoughts here too.
I guess if zeromq is already shipping prebuilds the point is that it's just about supporting the prebuilds in the ncc build. That is definitely something we could support here.
Yep, we (zeromq) already ship prebuilds so if there's a nice way for ncc to support prebuilds then I'm happy. ๐
Most helpful comment
Yep, we (zeromq) already ship prebuilds so if there's a nice way for
nccto support prebuilds then I'm happy. ๐