I am writing an interface code library (in C++) for a device that has a proprietary protocol. I am not allowed to publish details of the protocol but I am allowed to publish the compiled library (i.e. not the source code). I will be creating node-red nodes to allow me to control the device but would like to publish a set of node-red nodes for public use. I can use node-gyp for my own version but is there a way to package node-red nodes with a pre-compiled library (obviously would require different versions for different platforms and that might be the show-stopper)?
This isn't node-red specific, it's about how to ship pre-built binaries for nodejs modules.
There are a bunch of nodejs modules that have pre-built versions of the binaries that are downloaded if available before trying to build from the source. You should be able to use this approach and just not ship the source so the install will fail if a matching binary can't be found.
node-pre-gyp seams to be the way to do this.