Schniz / fnm

🚀 Fast and simple Node.js version manager, built in Rust
https://fnm.vercel.app
GNU General Public License v3.0
17.74k stars 449 forks source link

Windows on Arm #1068

Open u9520107 opened 11 months ago

u9520107 commented 11 months ago

Any plans or status on windows on arm support?

fnm itself can stay in x86 as the performance is good enough. But on windows on arm machine, trying to install node v20.x that has official windows on arm support now, fnm would still just install the x86 version.

Schniz commented 11 months ago

Are there prebuilt binaries for windows arm? I would 100% support a fix for this

u9520107 commented 11 months ago

I think so. I am assuming you're referring to links like these? I think these are available for v20.x onward.

https://nodejs.org/dist/v20.9.0/win-arm64/ https://nodejs.org/dist/v20.9.0/node-v20.9.0-arm64.msi https://nodejs.org/dist/v20.9.0/node-v20.9.0-win-arm64.7z image

Schniz commented 11 months ago

That’s perfect. Do you want to contribute? I might have some minutes so send you links. I’m in reserves right now and we have a war so I’m not fully available. But I think that’s a perfect small PR :)

u9520107 commented 11 months ago

I can fork and try. But my rust is beyond rusty... might take a while.

u9520107 commented 10 months ago

@Schniz I just realized that with the --arch parameter, it is already possible to install the arm version on windows on arm.

In this case, perhaps it's not a good idea to change the premise that when the system can run multiple architecture, fnm will choose the same arch as the fnm build itself.

I'd say this issue can be closed. An arm64 build of fnm itself is welcomed, but not really necessary in my opinion.

hyunbinseo commented 5 months ago

The Node.js architecture can be defaulted to Arm64 using an environment variable.

https://github.com/Schniz/fnm/blob/master/docs/commands.md

--arch <ARCH>
Override the architecture of the installed Node binary. Defaults to arch of fnm binary

[env: FNM_ARCH]

Thanks for the issue and comments. Switching from Node.js installer to fnm.

dennisameling commented 3 weeks ago

Here's a PR to build Windows arm64 binaries for fnm: https://github.com/Schniz/fnm/pull/1250