uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
479 stars 53 forks source link

macOS ARM pre-compiled binaries #164

Closed JamieMagee closed 1 year ago

JamieMagee commented 1 year ago

GitHub hosted runners for macOS ARM are currently in public preview^1. Whenever they go GA, would be be possible to pre-compile node-re2 binaries for them?

uhop commented 1 year ago

That would be awesome. When they are available, I’ll try.

uhop commented 1 year ago

Released in https://github.com/uhop/node-re2/releases/tag/1.18.1

uhop commented 1 year ago

For now, I do them manually from my laptop.

viceice commented 1 year ago

what's the difference between the darwin builds and the arm64 builds. We've again some issues with re2 being very slow because it needs to be rebuild on our linux/arm64 docker images

#6 115.1 npm ERR! Trying https://github.com/uhop/node-re2/releases/download/1.19.1/linux-arm64-108.br ...
#6 115.1 npm ERR! Trying https://github.com/uhop/node-re2/releases/download/1.19.1/linux-arm64-108.gz ...
#6 115.1 npm ERR! Building locally ...
#6 115.1 npm ERR!
#6 115.1 npm ERR! > re2@1.19.1 rebuild
#6 115.1 npm ERR! > node-gyp rebuild
uhop commented 1 year ago

See https://github.com/uhop/install-artifact-from-github/wiki/Install-from-cache#command-line-parameters for more details. The page explains how a fetcher interpolates a name.

Essentially a binary extension has 3 major variables: OS, CPU, and ABI. ABI is more-or-less a Node version, e.g., Node 19 and Node 20 have different ABIs.

I don’t do builds outside of standard runners provided by GitHub Actions. I ran a custom build on my laptop for darwin-arm64. It looks like you have a suitable custom runner. I suggest you exploring a private mirror: https://github.com/uhop/node-re2/wiki/Precompiled-versions#private-mirrors

It will allow you to build the linux-arm64 version and reuse it across your worker images.

viceice commented 1 year ago

ok, will try that mirror thing :)