Windows ARM64 as a cross-compile target

Abierto
#4,858 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@hum-n ya está trabajando en esto.

Desde el 4/12/2026.

  • #4859 de @hum-n — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
github-actions, typescript, zig

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
6.7k
Forks
229
Merge medio
14 h 29 min
PR fusionados (30 d)
787

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vercel-labs/scriptc

Todos los issues de vercel-labs/scriptc

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.