Thursday, October 27, 2022

node.js => native binary, with vercel/pkg

 Node.js Native Binary Compilation Using vercel/pkg | Pulumi Blog

Here’s an example of building the project in the current directory using node v18 for macOS ARM architectures:

# pkg [options] <input>
# -t, --targets        comma-separated list of targets
# -o, --output         output file name or template for several files
pkg -t node18-macos-arm64 -o bin/my-program .