Node.js for ARM64 Windows

1,137 views
Skip to first unread message

Jon Kunkee

unread,
Jan 4, 2019, 9:02:30 PM1/4/19
to nodejs
Hi!

I'm a Microsoft engineer on a team tasked with expanding the Windows 10 on ARM (ARM64 desktop) software ecosystem.

When news first broke about the new platform, this issue was filed:

https://github.com/nodejs/build/issues/1138

It took some time for the Win32 ARM64 SDK to get out of beta. Now that it's out, I've been asked to port Node.js. (I've been a Node.js dev before and rather like it.)

Most of Node.js is C++, and that mostly just builds. What doesn't work, though, means I have a few questions--as touched on in the issue. :)

* I'm planning to try to upstream a small configuration addition for OpenSSL to get it to build for ARM64 Windows. I have five commits' worth of changes that then enable building it from Node.js. Is the next version bump or library change of OpenSSL soon enough that these changes aren't necessary?

* Is Node.js sticking to GYP for the foreseeable future? If so, its MSVC cross-compile support needs work. It assumes that `#host`-tagged targets can be built for the target and run on the build host. (I'm currently working around this by building on an ARM64 machine with the toolchain running under emulation.)

* What is the v8 update cadence? Last I checked, node master had 7.1.302 while the first version with full ARM64 Windows support is 7.2.479--and that only builds with clang. I have patches that get it working with MSVC I'm hoping to have in v8 soon. (The node-v8 repo has been incredibly helpful here.)

* To support native modules, node-gyp needs some changes and NPM needs to take them. I'm still working on this, but what is the typical NPM update cadence? If I get my changes accepted by node-gyp and NPM, could that land in Node 12?

* Are there any questions I'm missing?

When I get my fork and PRs set up, I'll post links here.

Thanks,
Jon

Rebecca Turner

unread,
Jan 7, 2019, 4:43:50 PM1/7/19
to nod...@googlegroups.com

Hey there I can answer this bit:

> * To support native modules, node-gyp needs some changes and NPM needs
> to take them. I'm still working on this, but what is the typical NPM
> update cadence? If I get my changes accepted by node-gyp and NPM, could
> that land in Node 12?

Typically we do npm releases every two weeks. Releases are tested under a pre-release tag in this period and when the new release is cut the previous one is promoted to latest (assuming there weren't any problems to block that). Releases are downstreamed to Node.js at the time that they're initially done, but they don't land until a few weeks after they're tagged as latest in the registry. Overall, this means that when things are going normally Node sees new npms landing every two weeks, but that it may be a month between the change landing in npm and it landing in Node.

We ordinarily update dependencies with every release of npm, so just getting your change into node-gyp and getting a release done is enough for us to pull it into npm. However, it doesn't hurt to ping us when that happens to make sure we get your update promptly. That's best done at https://npm.community

You can certainly get an updated node-gyp into an npm in Node 12. Node 12 hasn't even had its initial release yet, and when it has it will be under active development for quite a while, so even if your patch isn't ready in time to land for Node 12, it will be able to be included in a later release.

-- Rebecca

jku...@microsoft.com

unread,
Feb 12, 2019, 12:11:10 AM2/12/19
to nodejs

For those interested, I'm tracking progress on my port here:

All of the changes are in PR except updating NPM and updating ICU.
Thanks! This is great to know. I'm hoping to have everything merged by roughly the middle of March, so this tells me how much lead time is needed. When GYP and node-gyp pick up my changes, I'll head over to npm.community to follow up. 

Cheers,
Jon
Reply all
Reply to author
Forward
0 new messages