Platform Support

macOS (arm64)

The primary platform. clang — preinstalled with the Xcode Command Line Tools — is the only system dependency for producing binaries. The full surface is supported: the language, the stdlib, the Node API surface including the server stack, --dynamic, and the sanitizer lane.

Cross-compilation via zig

scriptc cross-compiles from macOS using zig's bundled clang and sysroots. Install zig, then select it with two environment variables:

SCRIPTC_CC=zigcc
Use zig's clang as the C compiler.
SCRIPTC_TARGET=<triple>
The target triple, including a glibc version for Linux targets.

Linux (arm64, x86_64)

$ SCRIPTC_CC=zigcc SCRIPTC_TARGET=aarch64-linux-gnu.2.36 scriptc build fib.ts -o fib-linux
$ file fib-linux
fib-linux: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 2.0.0, with debug_info, not stripped

The runtime has native Linux backends throughout: the event loop is epoll (kqueue on macOS), the server stack and TLS (with distro CA-bundle probing) and fs.watch all have Linux implementations, verified against Linux Node in a container-based differential lane. x86_64-linux-gnu.2.36 works the same way.

Windows (x86_64)

$ SCRIPTC_CC=zigcc SCRIPTC_TARGET=x86_64-windows-gnu scriptc build fib.ts -o fib.exe
$ file fib.exe
fib.exe: PE32+ executable (console) x86-64, for MS Windows

The language, stdlib, fs, and async surfaces pass a differential lane against Windows Node. Not ported yet: the socket/server stack (net/http/https/tls/dgram) and child_process.

What doesn't cross-compile yet

  • --dynamic binaries are host-native only. The embedded engine archive is built per target; cross-compiling a --dynamic build is not supported today. Static programs cross-compile fully.
  • --sanitize is a host-build lane.

Summary

PlatformHowStatus
macOS arm64nativePrimary: full surface, --dynamic, sanitizer lane
Linux arm64 / x86_64SCRIPTC_CC=zigcc SCRIPTC_TARGET=<arch>-linux-gnu.2.36Static surface incl. servers, TLS, fs.watch; verified against Linux Node
Windows x86_64SCRIPTC_CC=zigcc SCRIPTC_TARGET=x86_64-windows-gnuLanguage, stdlib, fs, async; no servers or child_process yet