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

Support ARM64 build for Windows #33620

Closed
77 opened this issue Aug 31, 2017 · 45 comments · Fixed by #85326
Closed

Support ARM64 build for Windows #33620

77 opened this issue Aug 31, 2017 · 45 comments · Fixed by #85326
Assignees
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Milestone

Comments

@77
Copy link

77 commented Aug 31, 2017

New devices are coming to market in a couple months. These are ARM64 devices running the Windows 10 OS. Can we get an officially supported build of VS Code that runs native on ARM64?

@rcjsuen
Copy link
Contributor

rcjsuen commented Sep 1, 2017

Electron would have to support ARM binaries on Windows first, which it currently does not.

@joaomoreno joaomoreno added this to the Backlog milestone Sep 1, 2017
@joaomoreno joaomoreno added feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues labels Sep 1, 2017
@joaomoreno joaomoreno removed their assignment Sep 1, 2017
@joaomoreno joaomoreno changed the title FEATURE: Support ARM64 build for Windows Support ARM64 build for Windows Sep 1, 2017
@77
Copy link
Author

77 commented May 15, 2018

Now that Microsoft released the ARM64 compilers in the SDK we can move forward on this.

@shiftkey
Copy link
Contributor

shiftkey commented Feb 7, 2019

For reference, you should follow along with the Electron issue electron/electron#9456 as well as the upstream Chromium issue https://bugs.chromium.org/p/chromium/issues/detail?id=893460 as these are both blockers for VSCode to be able to run on Windows for ARM64..

@driver1998
Copy link

As an update, somebody successfully built VSCode for Windows ARM64.
http://github.com/ljsabc/Code-OSS-Win32-arm64

@pponaldo
Copy link

As I know, electron started to support windows 10 on arm64 in stable version. Is there an official support of vs code?

@conioh
Copy link

conioh commented Oct 24, 2019

@rcjsuen @joaomoreno
Official Windows ARM64 Electron release: https://electronjs.org/blog/electron-7-0
https://github.com/electron/electron/releases/tag/v7.0.0
electron/electron#20112

@voronoipotato
Copy link

Surface Pro X is released (I'm using it now), is there any timeline for VS Code for Windows Arm64?

@Chirishman
Copy link

I tracked down their booth and asked them about it at Ignite, they would not give a timeline but basically said that the primary blocker at this point is having the man hours to run the testing to make sure that it works as expected with all of the third party extensions.

@voronoipotato
Copy link

That's a fair concern but I'd rather have vscode with no extensions than no vscode.

@driver1998
Copy link

Sure having ARM64 might make current extensions incompatible, but we need native VSCode to kick start native extension development isn't it?
People can always install both x86 and ARM64 vscode if they have to.

@nix2intel
Copy link

Just Checking on this, purchased a surface pro X and super excited about vscode on this device but would rather have ARM64 than x86

@voronoipotato
Copy link

Same is there anything we could do that would help?

@bvibber
Copy link

bvibber commented Nov 19, 2019

Note that if you have a WSL-based workflow, the remoting server in VS Code Insiders now supports ARM64 Linux. This allows using the official x86 frontend app with ARM64 Linux extensions running in the WSL environment, and works well for my PHP+JS projects for now.

However as with a potential ARM64 Windows frontend, not all extensions work yet. I found that the Rust (RLS) and PHP intellisense extensions work ok, while the C/C++ one explicitly fails out saying it's without support for ARM64 Linux.

@voronoipotato
Copy link

How are you testing an arm 64 windows front end? I can use a terminal based workflow if I can use vscode Win Arm 64.

@hmartinez82
Copy link

@Brion @voronoipotato How did you even get an ARM64 front end? Teach me

@voronoipotato
Copy link

Surface Pro X, it's pretty great actually. The major hurdle is just the software side, but otherwise it's very good.

@bvibber
Copy link

bvibber commented Nov 20, 2019

I'm still using the x86 frontend in emulation, so only the extensions inside the WSL Linux sandbox are running natively ARM64 for me. But I've heard some folks have had success manually building the frontend for ARM64?

@voronoipotato
Copy link

voronoipotato commented Nov 20, 2019

https://code.headmelted.com/ aka https://github.com/headmelted/codebuilds Perhaps this is a good starting point.

@awakecoding
Copy link

+1, I would love to use VSCode on my Surface Pro X

@richard-townsend-arm
Copy link
Contributor

What Electron do is they run the Azure DevOps device runner in x86 mode - seems to work fine for them and they use that to test the ARM64 binary.

@conioh
Copy link

conioh commented Apr 27, 2020

Thanks for the update. A few questions:

Just spitting out what needs to happen here.

This process has many steps:

  1. Build: This has been somewhat achieved in Add gulp targets, fix build for Windows on Arm. #85326, still some work to be done on our side.
  2. Test: We have a test machine (Surface Pro X) on the way, so this will happen soon. I'll post results as soon as possible.

I have a machine. Can we get an officially-built VSCode for ARM64 (even an "alpha"/preview/whatever version) to test too? My machine is from a previous generation (Asus NovaGo, SD835) and I'd like to see that it works there too.

(If you have a test suite you'd want me to run I think I could do that too, if you don't have special environment requirements.)

  1. Integrate: This is the hardest part. We rely on Azure DevOps for building and there aren't any hosted ARM64 build agents. A few options here: roll our own build agent or cross-compile this on x64.
  2. Collaborate: We've seen this happen when we released remote for ARM64: our partner extensions are not prepared for this. These are extensions which rely on native components to operate (C#, C++, Rust, etc) and they need to release those components for the ARM64 architecture. We should do a better job this time and let them know ARM64 for Windows is coming, otherwise we're just dumping an onslaught of issues on them as soon as we release. This might take a while.

I don't know how this works now, with VSCode being available for Windows, Linux and macOS, but assuming you have some method of specifying platform and extensions bring the appropriate native components for each platform, sounds like all you need to do is to add win-arm64 to win-x86-32, win-x86-64, linux-x86-64 and macos-x86-64.

What's the difference? It's completely expected that certain extensions will only work on certain platforms. A WPF designer will only work on Windows. A Swift extension will work on macOS and Linux, but not Windows. That's fine. I don't think any reasonable person expects all extensions to work on all platforms. I'd be satisfied with extensions with native components that can't run on a certain platform to give an early error before downloading and trying to install.

That sounds like something that should already be in place. I don't see why we should wait for extensions X, Y and Z to support ARM64 when other things are already working.

@joaomoreno
Copy link
Member

I don't know how this works now, with VSCode being available for Windows, Linux and macOS, but assuming you have some method of specifying platform and extensions bring the appropriate native components for each platform, sounds like all you need to do is to add win-arm64 to win-x86-32, win-x86-64, linux-x86-64 and macos-x86-64.

We don't build the C#, C++, Rust extensions. Our partners do that. Extension authors have to be onboard, otherwise their features will just be broken. This has happened before when releasing the ARM64 remote for Linux. We don't have to wait for that to happen, but we should to a better job at collaborating with them to let them know a torrent of issues is about to fall on top of them.

@tuanle07
Copy link

@joaomoreno : It would be great if Microsoft could release the Win Arm64 version of VS Code soon. Having it working on Surface Pro X would be the last program I need on this machine to make it 100% usable for my daily work. Pls make it happen soon. Many thanks.

@voronoipotato
Copy link

@joaomoreno To be clear the x86 emulation is good enough their extensions will "work" provided it pulls x86 instead of x64. I agree though that it is up to the extension authors and their community (us) to help update everything for ARM should we need to.

@FossPrime
Copy link

@joaomoreno To be clear the x86 emulation is good enough their extensions will "work" provided it pulls x86 instead of x64. I agree though that it is up to the extension authors and their community (us) to help update everything for ARM should we need to.

Clarification, Windows on ARM supports emulating x86_32, but does not support emulating 64 bit x86_64 apps. Native apps are either ARMv8_64 or ARMv7_32 apps, publishing ARM32 is usually unnecessary... unless you're targeting older Raspberry Pi's which don't have the memory to run VS Code properly anyway or Windows RT which is dead. Windows 10 on ARM doesn't come in a 32 bit variant.

@hwchong
Copy link

hwchong commented May 1, 2020

It's not only a matter of compilation but of running as well. We want to run all our test suites on the built bits.

Would it help if a Qemu Windows ARM64 environment was set up to run the tests?

@dennisameling
Copy link

What Electron do is they run the Azure DevOps device runner in x86 mode - seems to work fine for them and they use that to test the ARM64 binary.

I wanted to understand how exactly the Electron team did this, and it seems like they literally set up a Surface device (I guess a Surface Pro X) which they use for Azure DevOps. Like @richard-townsend-arm mentioned, they should be running the self-hosted x86 Azure DevOps agent as there's no arm64 version for it, but it works for them apparently.

I'm working on adding Windows ARM64 support to GitHub Desktop and wanted to try the same, so I installed the Azure DevOps x86 agent on my Surface Pro X and created an Azure Pipeline. So, the setup is:

  • Windows 10 ARM64 host (Surface Pro X)
  • 32-bit NodeJS + VS Build Tools (ARM64 build for NodeJS is in the works)
  • Set npm_config_arch=arm64 and TARGET_ARCH=arm64 so that ARM64 binaries (like Electron ARM64) are downloaded

This seems to work well. An ARM64 build is created without issues, I only need to make sure that the tests will also pass, but that's unrelated to ARM64 specifically.

Would it help if a Qemu Windows ARM64 environment was set up to run the tests?

That might work, but I expect it to be incredibly slow. Running on a native ARM64 device already timed out after 1hr because the 32-bit emulation on Windows ARM64 slows things down significantly. Also, there's no Windows 10 ARM64 ISO files available via Microsoft's official channels AFAIK, so you'll need to do some magic yourself :) Instructions to create a Windows 10 ARM64 ISO can be found on this page, just ignore the Raspberry Pi-specific bits.

@joaomoreno
Copy link
Member

joaomoreno commented May 3, 2020

@dennisameling That is pretty much my plan as well, once we get that Surface Pro X. Glad to know you had success. Good news for this feature item.

@joaomoreno
Copy link
Member

joaomoreno commented May 28, 2020

🚀 And... we have liftoff: https://twitter.com/joaomoreno/status/1266005299661545474

image

@joaomoreno
Copy link
Member

Special thanks to @richard-townsend-arm for pushing this forward in #85326 👏

@joaomoreno joaomoreno modified the milestones: Backlog, May 2020 Jun 1, 2020
@joaomoreno joaomoreno added the verification-needed Verification of issue is requested label Jun 1, 2020
@joaomoreno
Copy link
Member

@deepak1556 Care to verify this one?

@deepak1556
Copy link
Collaborator

Sure happy to 👍

@deepak1556 deepak1556 added verified Verification succeeded and removed verification-needed Verification of issue is requested labels Jun 3, 2020
@joaomoreno joaomoreno self-assigned this Jun 5, 2020
@joaomoreno joaomoreno added the on-release-notes Issue/pull request mentioned in release notes label Jun 5, 2020
@danieldjewell
Copy link

FWIW, perhaps the team at Microsoft can look into Microsoft-made extensions and ARM support... -- e.g. microsoft/python-language-server#2073

@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues on-release-notes Issue/pull request mentioned in release notes verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.