Windows ARM64 as a cross-compile target

オープン
#4,858 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@hum-n がすでに取り組んでいます。

2026年12月4日 から。

  • #4859 @hum-n による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
github-actions, typescript, zig

調査の方向性

A linked pull request, #4859, already implements this work. To understand the change, review its updates to targets.ts, target.cpp, CMakeLists.txt, targets.mjs, the Windows ARM64 runtime pack, tests, and platforms.mdx. The issue also identifies release-build.yml and release.yml as unresolved release integration points; check the pull request discussion for their status before taking any work.

索引モデルが issue の本文から書いたものです。

説明

scriptc builds Windows executables for x64 only. I'd like to add aarch64-windows-gnu as a cross-compile target, so ARM64 Windows executables can be built from any supported host, the way Android and iOS work today.

Scope

  • Building for ARM64 Windows from macOS, Linux or x64 Windows.
  • It doesn't make scriptc itself run on ARM64 Windows (no win32-arm64 CLI, helper or @tsc-ts package). That's a separate, bigger change.
  • No Node islands on this target. ni_ctx_swap in scr_node_island.c is x64 assembly, so the pack leaves that file out, and @scriptc/node fails the build with SC3002 instead of at link time.

Changes (#4859)

  • The target in targets.ts. The LLVM helper accepts the triple and emits COFF for AArch64 (target.cpp, CMakeLists.txt, targets.mjs), so the helpers need a rebuild.
  • A @scriptc/runtime-win32-arm64-msvc pack, built with zig like the x64 Windows pack.
  • The early SC3002 error for island programs.
  • Tests and platforms.mdx.

Testing
I ran a lane on my fork (https://github.com/hum-n/scriptc/actions/runs/47353756780): every 4th corpus program, minus @requires-libnode ones, was cross-compiled on Linux for both aarch64-windows-gnu and x86_64-windows-gnu, and both builds ran side by side on windows-11-arm, with the x64 build (under emulation) as the reference. Of 1988 programs, 1731 gave the same stdout, stderr and exit code on both (23 of those differed only in architecture names, pids, temp folder names or the default NaN's sign bit), 256 don't build for Windows on either architecture, and 1 built for arm64 but not x64.

Questions

  1. release-build.yml and release.yml don't build or publish the new pack yet. Where do you want it built? It cross-builds on Linux with zig, same as the Android pack.
  2. Want the lane as an optional workflow_dispatch job? It takes about 30 min across 8 shards.
主要言語
TypeScript
スター
6.7k
フォーク
229
平均マージ
14時間 29分
マージ済み PR(30日)
787

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

vercel-labs/scriptc のほかの issue

vercel-labs/scriptc の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。