workerd icon indicating copy to clipboard operation
workerd copied to clipboard

feat(build): add support for windows arm64

Open p-romain opened this issue 1 year ago • 6 comments

Hi, I will try to add the support for windows arm64 (binary build), since we are now few users running a Snapdragon X Elite computer.

p-romain avatar Oct 24 '24 18:10 p-romain

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

github-actions[bot] avatar Oct 24 '24 18:10 github-actions[bot]

First requirement is OK, the windows-2022 runner has Microsoft.VisualStudio.Component.VC.14.29.16.11.ARM64 installed, probably via cross-compiler, so should work. Now I have to see if the .bazelrc need to be adapted.

p-romain avatar Oct 24 '24 18:10 p-romain

I have read the CLA Document and I hereby sign the CLA

p-romain avatar Oct 24 '24 18:10 p-romain

Thank you for your PR! Unfortunately, this might be difficult for us to support in the near-term:

  • Cross-compilation under bazel is a complex beast. For macOS this is well supported when using bazelbuild/apple_support, but last time I tried I couldn't get cross-compilation to work on Linux despite significant changes (Rust support was one issue). Based on that I assume that this won't work as-is and that developing cross-compilation support would be lots of effort.
  • workerd Windows releases are built using free-tier GitHub actions runners for the time being, support for Linux and Windows arm64 runners is not available but expected by EOY. That should provide a much clearer path to supporting arm64 Windows.

fhanau avatar Oct 24 '24 21:10 fhanau

Hi @fhanau thank you very much for all the explanations. Yes, this makes sense, I also noticed this on other projects hosted in Gitlab: we're waiting the GA of arm64 runners. I've also noticed that the windows 64 binary works on windows arm64 in emulation, so this will be my workaround in the meantime. At this time, because of workerd, we're not able to use wrangler 3 (out-of-the-box) on windows arm64.

p-romain avatar Oct 25 '24 20:10 p-romain

FWIW I would welcome a switch to windows cross-compilation if someone was able to do it. We've all spent enormous time banging our heads against windows. I remember that windows cross compilation was an explicit goal of clang team. Maybe it is finally possible with clang 20?

mikea avatar Oct 26 '24 02:10 mikea

How did you get wrangler to work on Arm64? as a workaround, cannot find any way to do it. If the binary works on Arm64 would it be possible to setup the installer to use that until a proper binary is available?

petero-dk avatar Dec 12 '24 11:12 petero-dk

Finally I've experienced some issues with the x86 version emulated under arm64. The version 2 was not compatible with my needs (nodejs functions support). I was only able to make it work with WSL. But after that, I've experienced lot of issues with Prisma, pg driver, Hono under Wrangler. Finally the 1 Mo bundle limitation has finished me off. I don't consider anymore cf worker for my backend, I've switched back to Symfony.

p-romain avatar Dec 17 '24 00:12 p-romain