Commit Graph
22 Commits
Author SHA1 Message Date
Chris Tate 469efdd7f0 refactor: clarify compiler module boundaries (#232)
* refactor: clarify compiler module boundaries

- Rename backend, frontend, IR, and cache modules for explicit ownership.
- Split native cache/vendor and frontend shared concerns into focused modules.
- Expand compiler context names and refresh imports, tests, and documentation.

* fix: preserve renamed compiler interfaces
2026-08-23 20:16:13 -05:00
Chris Tateandvercel[bot] f237e44c73 perf: cache complete executable builds early (#188)
* perf: cache complete executable builds early

- Restore exact executable builds before TypeScript frontend and lowering work.
- Validate frontend, native dependency, mode, target, and FFI identities before reuse.
- Cover cross-process hits, corruption repair, invalidation, and native fallback behavior.

* Update tests/harness/README.md

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* fix: harden early executable cache identity

* fix: fingerprint effective compiler for early cache

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2026-08-21 08:41:51 -05:00
Chris Tate 741e8cd3f6 Split volatile library identity code (#174)
* Split volatile library identity code

- Emit build identity getters from a tiny standalone C translation unit
- Cache generated library program objects independently of volatile identity and archives
- Preserve toolchain, runtime, and translation-unit dependency invalidation coverage

* Preserve library identity during localization

* Keep library identity sources private

* Preserve library identity in public emission

* Preserve identity in kept library units
2026-08-19 23:36:22 -05:00
Chris Tate 06d50244d0 Reuse IR across comment-only library edits (#171)
* Reuse IR across comment-only library edits

- Restore validated lowered IR when TypeScript edits change only non-semantic comments
- Rebase source locations and regenerate exact-source sidecar and build identities
- Add semantic invalidation, integrity, and real-cache coverage

* Fix semantic cache lexical validation

* Use canonical IR version in semantic cache

* Fix semantic cache lexical rebasing

* Fix semantic cache Unicode identifiers
2026-08-19 13:02:47 -05:00
Chris Tate d1a1da97a2 Cache unchanged library frontends (#169)
* Cache unchanged library frontends

- Restore generated library artifacts before TypeScript and lowering on exact repeats
- Track source, configuration, package-resolution, and missing-candidate inputs for safe invalidation
- Add integrity, replacement, and cache-disable coverage plus cache documentation

* Fix early frontend cache invalidation

* Fix early cache input race tracking

* Fix early frontend cache output tracking

* Key frontend cache by Node version
2026-08-18 11:04:08 -05:00
Chris TateandArth Tyagi 6f50205dfd feat: support aarch64 Linux musl (#159)
- Implement the Zig 0.16.0 AArch64 musl runtime and preserve compiler failure diagnostics.

- Promote the target through executable, library, localization, and documentation matrices.

- Verify both backends and the complete arm64 Alpine differential contract.

Co-authored-by: Arth Tyagi <41021374+arthtyagi@users.noreply.github.com>
2026-08-15 10:53:06 -05:00
Chris Tateandsqlpxc 2c164dd374 feat: support x86_64 Linux musl targets (#131)
* feat: support x86_64 Linux musl targets

- add musl runtime shims for randomness, fibers, and child-process cwd support
- validate executable and library outputs against Alpine Linux
- document x86_64-linux-musl cross-compilation

Co-authored-by: sqlpxc <38583139+sqlpxc@users.noreply.github.com>

* fix: harden musl runtime portability

* fix: keep child fixture portable across hosts

---------

Co-authored-by: sqlpxc <38583139+sqlpxc@users.noreply.github.com>
2026-08-11 12:10:03 -05:00
Chris Tateandkongxiangyiren 303ed952e1 fix(fetch): support Response construction (#98)
* fix(fetch): support Response construction

- Lower global Response calls through the native C and LLVM runtimes.
- Match Node 24 coercion, validation, and stream error precedence.
- Cover supported BodyInit and ResponseInit behavior with differential tests.

Co-authored-by: kongxiangyiren <72970235+kongxiangyiren@users.noreply.github.com>

* fix(fetch): align constructed response headers

* Fix Response construction and header iteration

* fix(fetch): align Response constructor conversion

* fix(fetch): preserve Response constructor semantics

---------

Co-authored-by: kongxiangyiren <72970235+kongxiangyiren@users.noreply.github.com>
2026-08-08 16:43:44 -05:00
Chris Tate 9fb068ae27 Merge pull request #77 from vercel-labs/ctate/node24-fetch-inventory
feat(compat): inventory Node 24 fetch surface
2026-08-02 16:37:36 -05:00
Chris Tate c356ff0ac0 Merge pull request #73 from vercel-labs/ctate/no-persist-compile
Persist native compilation cache
2026-08-02 14:58:35 -05:00
Chris Tate 68263610e3 fix(compiler): prevent stale native cache hits 2026-08-02 13:59:06 -05:00
Chris Tate a1215f6ef9 fix(compiler): bypass cache for opaque wrappers 2026-08-02 13:00:17 -05:00
Chris Tate dcc5a03a52 fix: validate native cache state and artifacts 2026-08-01 18:38:22 -05:00
Chris Tate 89b5ab3355 feat(compat): inventory Node 24 fetch surface
- Classify Node 24 fetch APIs and options by static, dynamic-only, unsupported, and out-of-scope support.

- Project the inventory into the surface manifest and add runtime drift and conformance checks.

- Fence unprofiled Headers members with actionable SC2020 diagnostics.
2026-08-01 17:01:32 -05:00
Chris Tate 53e07fc55c fix: harden native build caches 2026-08-01 15:39:44 -05:00
Chris Tate 1f1f7d42a7 fix native cache invalidation 2026-08-01 15:39:44 -05:00
Chris Tate 6b996ea4a8 fix: harden persistent compilation cache 2026-08-01 15:39:44 -05:00
Chris Tate 2c1406325d fix(compiler): harden persistent cache identity 2026-08-01 15:39:43 -05:00
Chris Tate a578a9ab9b Persist native compilation cache
- Enable bounded platform-native caching for production executable and library builds.

- Reuse library runtime objects across edits and avoid duplicate no-npm frontend loading.

- Cover cache defaults, invalidation, bypass behavior, and artifact equivalence; document controls.
2026-08-01 15:39:43 -05:00
Chris Tate 2d0bc2df0b Add generated Node 24 fetch conformance
- Pin the supported fetch surface to an explicit Node and Undici profile.
- Generate deterministic WebIDL, AbortSignal, and stream differential campaigns.
- Match Node stream pull scheduling while preserving typed source identity.
2026-08-01 15:33:37 -05:00
Chris Tate 9ac1d1ea6b Cross-target conformance lane for library mode (SCRIPTC_CROSS=1)
- Every K-fixture library profile cross-builds through compileLibrary for aarch64-linux-gnu.2.36, x86_64-linux-gnu.2.36, x86_64-windows-gnu, and x86_64-macos, both emissions — 112 archives, ~2min warm, which plus the hard zig requirement is why the lane is env-gated like its linux/windows siblings
- Per archive on the host: K1 symbol exactness against the profile's declared set (Apple's nm is llvm-nm and reads ELF/COFF/Mach-O alike; Mach-O's underscore is the only decoration), the K8 ambient audit in bare and COFF-dllimport spellings, and probe LINKABILITY against the target's libc plus the documented win32 embedder libs
- K2 execution probes ride the existing infrastructure gates: SCRIPTC_LINUX=1 runs the scalar round-trip per linux triple in the bookworm container, SCRIPTC_WIN=1 ships it to the box over scp and folds the mingw CRT's text-mode CRLF back on that one leg
- x86_64-macos stays build-only by contract; the probe runs as a bonus when Rosetta is detected
- README documents the fifth lane beside the linux/windows differentials
2026-07-24 18:22:45 -05:00
Chris Tate 23d5918a53 init 2026-07-22 18:08:04 -05:00