Skip to content

fix: install script not x86 windows; add warning for arm64 windows #19911

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vladfrangu
Copy link

@vladfrangu vladfrangu commented May 26, 2025

What does this PR do?

This PR "fixes" the install script on Windows by correctly checking whether the script is ran on x64 instead of ARM64.

That said, bun does seem to work fine on ARM64, including building bundles but ofc it's probably luck of the draw. Crosscompiling on x64 and running on ARM64 doesn't work however...

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

Ran -not (((Get-CimInstance Win32_ComputerSystem)).SystemType -match "x64-based") on Powershell on Win11 on ARM64

Parallels Desktop - 2025-05-26 at 09 10 15@2x

On a friends machine, that IS on x64,
image

related #9824

@RiskyMH
Copy link
Member

RiskyMH commented May 26, 2025

Nice, I didn't know bun worked on arm windows. I wonder if it is because microsoft made a decent emulator now or if just really lucky with how the binary is made.

I wonder if we should make it throw a warning though, to tell user that it has a higher chance of random issues.

@vladfrangu
Copy link
Author

Nice, I didn't know bun worked on arm windows. I wonder if it is because microsoft made a decent emulator now or if just really lucky with how the binary is made.

The installed bun SEEMS to work, but I've only used it for two things: running a random script, and building a bundle. Building a bundle on x64 and copying it on ARM64 doesn't work however, and I have been unable to debug why...

I wonder if we should make it throw a warning though, to tell user that it has a higher chance of random issues.

If you want, I can do this too for sure! I do wonder what it would take to actually get a native build of bun on arm64 tho 👀 (gh does have windows-11-arm runners now, but I assume its more so JSC/zig stuff?)

@RiskyMH RiskyMH requested a review from Electroid May 26, 2025 07:31
@RiskyMH
Copy link
Member

RiskyMH commented May 26, 2025

So after trying out this windows arm (emulated on apple silicon macbook), I haven't found any clear issues that windows bun in general doesn't already have.

But would like input from @Electroid (or other team members) if should be documented further, just have it working with warning, or block install like this pr will do. Oh and consider building it natively, but that seems to be an interesting task.

@190n
Copy link
Collaborator

190n commented May 27, 2025

I'd be fine with allowing Windows ARM as long as we update the issue template to make sure we know when users are emulating it:

For MacOS and Linux: copy the output of uname -mprs For Windows: copy the output of "$([Environment]::OSVersion | ForEach-Object VersionString) $(if ([Environment]::Is64BitOperatingSystem) { "x64" } else { "x86" })" in the PowerShell console

Right now I believe this will have WoA users writing x64 since it is 64-bit.

@RiskyMH
Copy link
Member

RiskyMH commented May 28, 2025

We can edit the script to be a simpler & show the type

"$([Environment]::OSVersion | ForEach-Object VersionString) $env:PROCESSOR_ARCHITECTURE"
# normal: Microsoft Windows NT 10.0.26100.0 AMD64
# arm:    Microsoft Windows NT 10.0.26100.0 ARM64

On this similar thinking, the crash report I'd also like to have it show this too (ie on windows x86_64_baseline (arm emulating) [InstallCommand] type thing), but not sure how hard that would be.

@vladfrangu
Copy link
Author

On this similar thinking, the crash report I'd also like to have it show this too (ie on windows x86_64_baseline (arm emulating) [InstallCommand] type thing), but not sure how hard that would be.

If you can guide me where that is done I can try to make it happen, but it might take longer. 😅

@vladfrangu vladfrangu force-pushed the fix-powershell-script-on-arm branch from 2c79738 to e958d9a Compare May 28, 2025 10:10
@vladfrangu
Copy link
Author

Ok, rebase from UI breaks verification. ty GitHub

@vladfrangu vladfrangu changed the title fix: install script not skipping arm64 windows fix: install script not x86 windows; add warning for arm64 windows May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants