Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Windows on ARM #502

Open
1 task done
soapdog opened this issue Jan 10, 2020 · 17 comments
Open
1 task done

Add support for Windows on ARM #502

soapdog opened this issue Jan 10, 2020 · 17 comments

Comments

@soapdog
Copy link

soapdog commented Jan 10, 2020

My Environment

  • Windows 10

This is just an enhancement request. I've noticed that NVM4W distinguishes between 32 and 64 bits but not between ia32, amd64 and arm64. If using NVM4W on a Windows on ARM machine. An arm64 machine will be identified as 64 bits but it can't run x64 executables, it can run x86 though. So it would be good to have a clause on install.cmd to handle it.

@coreybutler
Copy link
Owner

I'd be interested in learning more about the environments people would use this in. My biggest concern is capacity. Node/npm are both pretty big (relatively speaking). Multiple installations can eat up alot of hard disk capacity... perhaps too much. NVM4W itself is small, but I'd never really considered mobile or device environments. It makes sense to support it, but I'd like to have a frame of reference for this.

@soapdog
Copy link
Author

soapdog commented Jan 15, 2020

@coreybutler I'm talking mostly from the point of view of developers using machines like Surface Pro X which is a full windows 10 machine able to run windows arm native binaries and emulated ia32 binaries for windows.

At the moment the native arm64 win32 version of NodeJS is not ready for prime time but it is good enough to start testing. The problem is that switching between the arm64 version and the ia32 version is a manual job at the moment. Most package managers (chocolatey, scoop) and tools like NVM4W are not yet ready for Windows having a new architecture. The Surface Pro X identifies itself as a 64bits machine and lots of apps simply assume that means x64 which don't actually work on those machines.

I totally understand if you don't have capacity or will to take this into account since it is very early for those architectures but I felt like leaving an enhancement request here if only for it to be revisited some time from now when there are more machines and support for Windows on ARM out there.

@coreybutler
Copy link
Owner

Thanks for detailing that @soapdog. I'd forgotten about Surface Pro X... good use case.

Personally, I feel like any version manager should be able to support switching to a different architecture. After all, the point is to be able to switch to different versions for testing, upgrading, etc... I think this aligns with that goal.

My bandwidth is restricted by other projects (one of which is NVM4W's successor), but I'd be open to a PR. For anyone who reads this and is inclined to contribute, my biggest concern would be error handling and messaging. If the user's system doesn's support the architecture, that's ok.... as long as an error clearly explains why NVM4W can't continue. Retrospectively looking at NVM4W, I wish there were more detail in the errors. Lots of people get npm errors or other system errors that have nothing to do with NVM4W, but it's hard to tell due to generic error messages. For an entire architecture, it would be important to make it very clear that the machine/OS itself does or doesn't support it.

@elanpang
Copy link

Qualcomm released the snapdragon X elite with great performance, the arm64 version supporting will be necessary I think.

@coreybutler coreybutler added discovery needed consider for rt Pinned for use in the rt project labels Nov 18, 2023
@nixxcz
Copy link

nixxcz commented Nov 24, 2023

I'm using nvm on ARM64 version of Windows 11 in Parallels Virtual Machine on MacBook Pro with Apple Sillicon M1.

Since an ARM64 build of NodeJS for Windows exists, I would love if nvm was able to install and manage it.

@alexaka1
Copy link

alexaka1 commented May 3, 2024

Even if one downloads and copies the arm64 build manually, nvm lists it as available locally, but nvm use says it is not installed.

@fluiddot
Copy link

Microsoft seems to be betting a bit more on ARM machines which might make this issue more relevant than when it was originally created.

https://www.theverge.com/2024/5/20/24160498/microsoft-arm-surface-laptop-6-qualcomm-snapdragon-x-elite

@alexaka1
Copy link

In the meantime fnm supports ARM on Windows (too). You can use --arch <ARCH> to set the architecture for new installs. That solved my needs.

@talynone
Copy link

There's a PR for it, but no one has pushed it forward, I'm guessing a dev with write access and an ARM computer is not available.

#1070

@coreybutler
Copy link
Owner

I'm the only dev (always have been). I don't have an ARM device to test on, but Go cross-compiles. The reason for the delayed merge is our code signing certificate is locked (because I was trying to add an automated release process that failed too many times).

@AmazingTurtle
Copy link

Hi there, I do have a snapdragon x elite dell xps 13 system at hand.
I can happily run x64 applications here as well, without the problem. The major issue to me is, that nvm pulls x64 node binaries rather than arm64 which sucks because nodejs suopports arm64. I think that needs to be adressed first.
Other than that, I happily offer to you that I test the binaries thoroughly (if you have tests suites etc) on my snapdragon system. We can also work together on that manner if you like

@coreybutler
Copy link
Owner

@AmazingTurtle thank you so much for the offer. We don't have test suites, but manually testing would be very quick... basically nvm install <version> and nvm use <version> and making sure it works. I'm not too concerned with indepth testing, because the only thing that really needs to be tested is to make sure the appropriate download is selected and that it ends up in the expected format (i.e. sitting in a folder within NVM_HOME). If you want to test the PR listed above, that would expedite the effort.

I am working with Microsoft right now on new code signing certs/reputation transfer so we can make releases again. That is really the bigger holdup because we don't want to release another update as an untrusted binary.

@AmazingTurtle
Copy link

@coreybutler where can i get the binaries for arm64?

@AmazingTurtle
Copy link

@coreybutler i compiled from source from the PR in question

image

it is a Aarch64 executable and it successfully pulls the proper arm64 node image as well.

image

this is what the build script produces. works on my machine!

@coreybutler
Copy link
Owner

Thank you @AmazingTurtle - this is fantastic to see. Remind me (if I forget) to add you to the thank you section in the release notes when I cut the next release.

@shayaansiddiqui
Copy link

how do I get to try the arm64 release for NVM?

@AmazingTurtle
Copy link

how do I get to try the arm64 release for NVM?

@shayaansiddiqui clone PR from #1070 - compile and move the binaries into your NVM installation directory or expand your PATH variables accordingly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants