ReviewOS

zig-utils/zig-js

Platform: support Windows and restricted-JIT Darwin profiles

#500
Open chris opened this 8 days ago ·
8 days ago

Parent: #459 Depends on: #483, #484, #498, #499 Related: #485

Goal

Declare and implement Windows x86-64/ARM64 plus restricted-JIT Darwin profiles with explicit native, AOT, or fast-VM performance contracts.

Current boundary

docs/platforms.md explicitly claims no Windows release platform. The optimizer inventory rejects iOS AArch64 publication. #484/#485 cover macOS/Linux native backends but leave Windows and platforms where executable-memory policy forbids normal JIT publication undefined.

Scope

  • Add versioned platform profiles for Windows x86-64, Windows ARM64, iOS/tvOS/visionOS as appropriate, and macOS deployments with JIT disabled by policy.
  • Implement Windows executable-memory allocation/protection/cache synchronization, ABI/calling conventions, unwind tables, exception/trap integration, thread-local/runtime primitives, and artifact retirement through #483.
  • Extend owned x86-64/AArch64 encoders and backend tests to Windows ABIs; never depend on an external assembler/JIT/runtime.
  • Define entitlement/policy detection for Darwin-family restricted hosts and select #498/#499 exact no-JIT/AOT paths without attempting forbidden mappings.
  • Gate portable engine, C API, private/public ABI where applicable, Workers/threads, GC, Wasm, modules, filesystem/provider boundaries, and packaging.
  • Collect correctness and performance evidence on real supported hardware; cross-build/emulation proves buildability only.

No-workaround rules

  • No RWX, writable published code, disabled platform mitigations, emulation-only performance claim, undocumented feature loss, external JIT/compiler, or platform marked native when optimizer publication remains zero.

Acceptance

  • Platform inventory names OS versions, architectures, ABI, native/no-JIT/AOT mode, executable policy, sanitizer support, CI/evidence host, and explicit unsupported cases.
  • Windows native profiles pass forced-tier, unwind, GC relocation, no-GIL, debugger/termination, OOM/fault, artifact-lifetime, test262, Wasm, ABI, and embedding gates.
  • Restricted profiles pass the complete #498/#499 contract without executable mapping attempts.
  • Real-hardware #460/#461 evidence records cold/warm throughput, compile/load cost, code/metadata/RSS, and tier attribution.
  • Owned dependency/offline gates remain green.

Foundation

Current declared matrix: docs/platforms.md and docs/.data/optimizer-release-inventory.json.

8 days ago

Toolchain compatibility child #626 is complete in d46ed71e, paired with zig-regex@87e9ca2. The exact CI Zig dev.1811 build and focused tests pass, removing all seven stdlib-upgrade diagnostics.

8 days ago

Final #626 follow-up: 6cb02043 is on main, covering current Zig dev.1818 and aligning all seven CI plus one performance workflow with the compatible zig-regex revision.

8 days ago

Platform inventory child #658 is implemented in 8106a0d2. The generated V2 matrix now names Windows x86-64/ARM64, iOS/tvOS/visionOS arm64 restricted profiles, and macOS arm64 no-JIT with explicit ABI, execution mode, executable policy, sanitizer/CI/evidence state, and blockers. All six remain machine-readably unsupported; restricted profiles forbid executable mapping by project policy and require #498/#499. The accepted V1 evidence remains unchanged. Local release compatibility is 12/12 green, docs render 49 pages, and 267-file offline links pass. Fresh CI is pending.

Sign in to comment on this issue.