facebook / facebook/relay

relay-compiler: Add Windows ARM64 (win-arm64) support

Open Beginner friendly
#5,350 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

## Summary

`relay-compiler` does not support Windows ARM64. Running it on a `win32`/`arm64` system throws:

Error: Platform "win32 (arm64)" not supported.

This is because `index.js` only maps `win32 + x64` to a binary, and falls through to `null` for `arm64`.

## Suggested fix

Windows ARM64 has mature built-in x64 emulation, so the simplest fix is to fall back to the existing `win-x64` binary:

```js
} else if (process.platform === 'win32' && process.arch === 'arm64') { // ARM64 Windows can run x64 binaries via emulation binary = path.join(__dirname, 'win-x64', 'relay.exe');
}

This is the same approach used for other tools that don't ship native ARM64 Windows binaries. The x64 binary runs without issues under emulation.

Context

• Windows ARM64 devices (Surface Pro, Snapdragon Dev Kit, etc.) are increasingly common for development
• Linux ARM64 support was already added (resolving #3799) — this is the equivalent for Windows
• The fix is a 3-line change to  index.js  (and optionally  cli.js )

Contributor guide

Open the contributing guide

Research direction

Start with index.js, where relay-compiler maps platforms to bundled binaries, and check cli.js if its platform handling is separate. Add the Windows ARM64 fallback described in the issue, then verify that a win32/arm64 installation selects the existing win-x64 relay.exe binary without the unsupported-platform error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.