node-re2
node-re2 copied to clipboard
ARM64 prebuild binaries
We at renovate are using re2
and have users who like to use it on ARM64
systems, so currently we would need to buildtools, as there are no prebuild binaries.
So i would suggest to also prebuild ARM64
binaries.
Some binaries are already build in docker images, so the docker ARM64
emulation can be used on linux host.
- renovatebot/renovate#9229
- https://docs.docker.com/desktop/multi-arch/
I'm all for it. I need to learn how to do it unless somebody donates the code, or helps with it.
Ok, i've updated the description a little bit, because this feature is requested by some users, but we maintainer have no direct interest, as we don't currently use or require ARM64
so this has a low prio and wait for the comunity to send pr's to make this happen.
I've also seen, that the ARM64
qemu docker emulation is very slow when trying to compile binaries, so maybe some cross compilation would make it alot faster.
https://github.com/nodejs/node-gyp/issues/829
The big question is how to set it up using GitHub Actions, which I use to prebuild binaries. Any working example is greatly appreciated. Obviously, I can rebuild them separately, e.g., on a local computer then submit them to a release, but it is more hassle and more chances to forget something.
Basically you need to enable docker arm emulator
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
The you need to add --platform Linux/arm64
arg to docker build / run command.
Maybe you need to use buildpack / buildx.
https://github.com/containerbase/buildpack/pull/47/files
+1 to this! When I do time npm install re2
on my M1 MacBook pro it does a full build and it takes quite a while:
real 0m40.293s
user 0m31.297s
sys 0m3.959s
@uhop any update here?
I still don't know how to build for the M1 MacBook using Github Actions. PRs are welcomed!
Until GitHub Actions provide ARM-based Windows and Mac runners, I don’t see how it can be done.
Closing for now.