53 Commits
Author SHA1 Message Date
Chris Tate 0845c7ff56 Make native installs portable and smaller (#599)
* Make native installs portable and smaller

- Support glibc 2.34 with portable compiler binaries and static LLVM helpers.
- Bundle the host runtime and discover optional cross-target packs from project dependencies.
- Add application build benchmarks covering latency, executable size, and memory.

* Keep bootstrap tools available in Sandbox validation

- Isolate Zig for native compiler bootstrap and glibc entropy contracts.
- Preserve the existing toolchain scope for cache and corpus tests.

* Fix portable compiler bootstrap linking

- Keep native support objects compatible with the destination host linker.
- Resolve installed targets using the host declared by the toolchain manifest.
2026-10-01 10:46:16 -05:00
Chris Tate 2069684b40 Expand static Effect support across common APIs (#598)
* Expand static Effect support across common APIs

* Preserve compiler parity across expanded Effect patterns

* Fix compiler regressions exposed by Effect coverage

* Bound shared type conversion traversal

* Clarify conversion contracts and tidy fixtures

* Run every Effect fixture in CI shards

* Preserve inferred array assignments in concurrent Effect programs

* Record inferred array fixture compiler ordering
2026-10-01 02:49:31 -05:00
Chris Tate b0c21f2fd2 fix: finish releases after npm accepts uploads (#597)
- Remove registry propagation polling from release completion.
- Resume accepted uploads from receipts without pre-publication registry requests.
2026-09-30 17:45:13 -05:00
Chris Tate 2cb4c65896 fix: package Windows distributions across hosts (#596)
- Resolve Windows toolchain paths during package verification and archive creation.
- Preserve completed native builds and accepted uploads across release tooling fixes.
2026-09-30 17:33:24 -05:00
Chris Tate 56dfb11b99 ci: publish releases from Linux (#595)
- Verify the Darwin helper in its existing native build job.
- Publish npm packages on Ubuntu without waiting for another macOS runner.
2026-09-30 17:24:15 -05:00
Chris Tate ec22b4beab fix: resume asynchronous npm releases (#594)
- Preserve accepted uploads and continue past pending npm publications.
- Reuse completed native builds when only the release workflow changes.
- Require public packages and complete assets before finishing a release.
2026-09-30 17:14:31 -05:00
Chris Tate 51ca803c16 chore: prepare v0.2.0 (#593)
- Synchronize published compiler, runtime, and native platform packages at 0.2.0.
- Document the native CLI, LLVM migration, and compatibility and performance improvements.
- Keep release version checks scoped to published packages.
2026-09-30 16:15:10 -05:00
Chris Tate 18c9a4233b perf: shorten native bootstrap and cache CI toolchains
- Reuse decoded AST nodes, parent references, and recursive class type analysis during compilation.
- Split expression and library validation into smaller functions while preserving diagnostics.
- Shorten sanitizer bootstrap and reuse verified CI toolchains.
2026-09-30 15:12:04 -05:00
Chris Tate eb7be34d9a perf: reduce compiler work and reuse CI native builds
- Reduce frontend, runtime, and linking overhead for native builds.
- Add compact compiler artifacts and reproducible build timing benchmarks.
- Reuse native CI packages and consolidate self-hosting validation.
2026-09-30 11:08:13 -05:00
Chris Tate ee9f0d64eb feat: ship the self-hosted native scriptc CLI (#585)
* feat: ship the self-hosted native scriptc CLI

- Run the shared compiler and CLI natively, including library builds and compile-time evaluation.
- Install native platform packages and ship relocatable standalone distributions.
- Preserve program semantics and reuse validated build artifacts for fast rebuilds.

* fix: complete native CLI integration and validation

- Preserve library diagnostics and run recursive compiler work on the main stack.
- Restore packaged helper permissions and exercise native npm and Wasm library builds.
- Recover interrupted Sandbox status probes within the original command deadline.
2026-09-30 02:17:56 -05:00
Chris Tate 9d30b56c6b Speed up compiler startup and trim release runtime packs
- Cache host libc detection and load TypeScript 5 only when needed.
- Exclude debug payloads from release runtime packs and vendor archives.
- Preserve native self-hosting, portable diagnostics, and reliable Sandbox execution.
2026-09-29 21:41:39 -05:00
Chris Tate 3f66c8e20b Make LLVM the sole production backend
- Remove C emission, debugging options, and automatic backend fallback.
- Complete LLVM lowering and native bootstrap coverage across supported targets.
- Link executables and libraries with precompiled C runtime packs, including iOS and Android.
2026-09-29 20:54:09 -05:00
Chris Tate 0d9d946dde Bootstrap a standalone native compiler (#572)
- Build static programs through the TypeScript 7 frontend, C and LLVM emitters, and native linker without a JavaScript host
- Share runtime-pack verification and link planning across native and Node compiler hosts
- Handle large C output and deep logical-expression validation during compiler bootstrapping
2026-09-29 09:21:59 -05:00
Chris Tate 7b007e03ef feat(compiler): bootstrap the LLVM emitter natively
- Run the production LLVM backend natively and reproduce its output across compiler generations.
- Replace unchecked emitter contexts with explicit shared state and callback hosts.
- Preserve NaN in serialized IR and respect optional record storage during spreads.
2026-09-27 22:29:24 -05:00
Chris Tate a1ec135d79 Distribute compile-heavy CI files across shards (#505) 2026-09-27 21:28:37 -05:00
Chris Tate 42638a65b7 Run self-hosting CI harness in a dedicated worker (#503) 2026-09-27 21:03:25 -05:00
Chris Tate 4c6635a3e0 isolate long serialization suite in macOS CI (#502) 2026-09-27 20:48:53 -05:00
Chris Tate c7b24413f7 Fix published LLVM helper execute permissions (#430) (#442)
- Declare POSIX helpers as npm bins so package tarballs retain executable mode.
- Check packed helper modes during release and in integration tests.
2026-09-25 15:32:37 -05:00
Chris Tate f7bad5b3f8 Run Test262 regression cases across all CI shards (#420) 2026-09-25 01:36:54 -05:00
Chris Tate 5072b7f8f5 ci: parallelize corpus shards and TypeScript 7 parity (#394)
* ci: trial ten test shards and five helper shards

- Shorten the corpus and helper critical paths with more macOS shards.
- Check complete real-corpus partitioning for both new shard counts.

* ci: run TypeScript 7 parity in parallel

- Move the frontend parity sweep to its own Ubuntu job alongside native artifact builds.
- Require the separate result in the aggregate CI gate.
2026-09-23 15:15:55 -05:00
Chris Tate 76816fc283 ci: split corpus tests across six shards (#393)
- Halve each CI shard’s corpus workload while retaining the plain and sanitized lanes.

- Check that the real corpus remains complete across the six-shard split.
2026-09-23 14:11:35 -05:00
Chris TateandMateus Mamede Lage b6bd80c391 fix(windows): support GUI executables (#380)
* fix(windows): support GUI executables

- Add Windows subsystem selection across executable link paths and cache keys.
- Verify PE subsystem output and add Windows CI coverage.

Fixes #259

Co-authored-by: Mateus Mamede Lage <23098414+mmamedel@users.noreply.github.com>

* fix(ci): restore cross-platform test parity

- Make the Windows subsystem test use a portable loader URL.
- Sync TS7 order-parity baselines with current corpus fixtures.

---------

Co-authored-by: Mateus Mamede Lage <23098414+mmamedel@users.noreply.github.com>
2026-09-22 20:40:11 -05:00
Chris TateandCruel f5ed014cc7 Preserve glibc 2.36 runtime compatibility (#365)
- Pin GNU runtime packs to glibc 2.36 Zig targets and reject incompatible imports.

- Provision verified Zig builds and exercise published artifacts on Debian Bookworm.

Fixes #349

Co-authored-by: Cruel <383999+Cruel@users.noreply.github.com>
2026-09-20 22:36:10 -05:00
Chris Tate 073c840564 Enforce TypeScript 7 and Node type-link parity (#315)
* Enforce TypeScript 7 and Node type-link parity

* fix(compiler): normalize Windows resolver paths

* fix(compiler): canonicalize Windows realpaths
2026-09-14 09:19:08 -05:00
Chris Tate ee7d5ac81f fix(release): reconcile async npm publishes (#306) 2026-09-13 19:22:23 -05:00
Chris Tate f2f897a24e fix(release): restore native helper executable bits (#305) 2026-09-13 18:49:48 -05:00
Chris Tate 6700381ff5 fix(release): build portable musl LLVM helpers (#304)
- Build musl helper packages as static host executables matching LLVM’s glibc and libstdc++ ABI.
- Preserve musl code-generation targets and Zig-built runtime packs.
- Add pre-merge Alpine execution and package verification coverage.
2026-09-13 18:23:41 -05:00
Chris Tate c5362177d9 fix(release): use bfd for musl LLVM links (#303) 2026-09-13 15:33:03 -05:00
Chris Tate 0d96facc27 fix(release): use external lld for musl helpers (#302) 2026-09-13 11:36:14 -05:00
Chris Tate 3339cf9521 fix(release): repair native package CI toolchains (#299) 2026-09-13 01:12:55 -05:00
Chris Tate c41f1a8be9 Expand LLVM native output targets (#280)
* Expand LLVM native output targets

- Add owned helper and runtime-pack contracts for macOS x64, Linux glibc/musl, Windows x64, and WASI.
- Generalize LLVM target selection, package validation, linker plans, and release/CI matrices.
- Document linker boundaries and add focused native-output and runtime-pack coverage.

* Pin Windows LLVM helper CI to VS 2022

The official LLVM archive needs the Visual Studio 2022 CMake generator, which is not guaranteed by windows-latest.

* Align bootstrap cache with LLVM runtime-pack builds

Use the same target-specific helper and linker identity before and after compiler loading so routed executable cache hits remain lightweight.

* Install Windows LLVM CI tools with Chocolatey

windows-2022 includes Visual Studio but not winget; use its available Chocolatey bootstrap for CMake and Ninja.

* Prevent Zig version probes from leaving runtime-pack objects

Run runtime-pack compiler version probes in a private temporary directory and remove the accidental tracked WASI a.o file.

* Use 7-Zip for Windows LLVM setup

Extract the official LLVM development archive with two-stage 7-Zip instead of Windows tar.exe, which timed out while materializing the toolchain tree.

* Define ssize_t for the MSVC runtime pack

Clang's MSVC target does not expose POSIX ssize_t through sys/types.h; define the pointer-sized runtime type without affecting MinGW.

* Build the Windows runtime pack with Zig

Use the MinGW-compatible Windows sysroot required by the runtime while retaining COFF helper output and installing Zig in the Windows native CI lane.

* Give macOS LLVM differential shard time to finish

Shard 1 passed its setup and focused contracts but was cancelled during its cold LLVM differential slice at the 20-minute job limit.
2026-09-01 13:41:34 -05:00
Chris Tate 1cec922d95 Separate native linking from C compilation (#278)
* Separate native linking from C compilation

 - Split the helper-object runtime-pack path into explicit link planning and platform linking.
 - Reserve SCRIPTC_LINKER for object-only executable links while retaining a deprecated SCRIPTC_CC compatibility path.
 - Add no-legacy-C coverage and document the linker/SDK boundary.

* Preserve runtime pack link errors

* Fix linker cache invalidation and warnings

* Fix C executable cache routing

- Keep explicit C builds on compiler-backed cache identities.
- Cover linker-only environment changes across exact C repeats.
2026-08-31 20:29:59 -05:00
Chris Tate 64b2a285d5 feat(runtime): ship precompiled macOS artifacts (#248)
* feat(runtime): ship precompiled macOS artifacts

- Add a versioned macOS arm64 runtime pack with deterministic feature selection and artifact verification.
- Link LLVM helper objects against release-built runtime and vendor inputs without compiling user-machine C.
- Wire package publishing, cache validation, documentation, and full-gate coverage for the new path.

* fix(runtime): harden precompiled artifact handling

* fix(runtime): make precompiled artifacts reproducible

* fix(runtime): reject opaque linkers from executable cache

* fix(runtime): normalize precompiled archive metadata

* fix(runtime): harden precompiled artifact caching

* fix(runtime): close executable cache link race

* fix(runtime): stage verified pack artifacts

* fix(runtime): bracket helper cache inputs

* fix(runtime): preserve executable link identity

* fix(runtime): trace selected linker dependencies
2026-08-28 09:29:21 -05:00
Chris Tate 73efea6ab3 feat(cli): expose native object link info (#247)
* feat(cli): expose native object link info

- add versioned, cache-independent native link metadata for program objects

- document the experimental runtime ABI and provide C-driver and Apple linker examples

- verify ABI mismatch, FFI parity, packed installs, and external linking in CI

* fix(example): validate native runtime pack identity
2026-08-27 13:47:09 -05:00
Chris Tate 401338f437 feat(compiler): add native LLVM object emission (#242)
* feat(compiler): add native LLVM object emission

- ship the pinned macOS arm64 LLVM helper and platform package
- add assembly/object CLI outputs, caching, diagnostics, and runtime ABI checks
- validate helper artifacts through CI, packaging, docs, and differential coverage

* fix(compiler): harden native LLVM emission

* fix(compiler): harden LLVM helper packaging

* fix(compiler): stabilize LLVM helper package size

* fix(compiler): harden native helper validation

* fix(compiler): harden LLVM helper verification

* fix(compiler): harden native object emission
2026-08-27 10:30:40 -05:00
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 Tate f5f04a5f49 Improve compiler lint and error classification (#208)
* Warn on non-null assertions

- Surface non-null assertions during linting without making them blocking.

- Preserve existing assertion sites for opportunistic cleanup.

* Classify internal compiler errors

- Export InternalCompilerError and migrate compiler invariant throws without changing messages.

- Rename the native cache test to match cc.ts and update test scheduling references.

- Document test placement by unit, package integration, and cross-package scope.

* Fix internal compiler error classification
2026-08-23 00:02:28 -05:00
Chris TateandKayakyx 952f5788aa fix(runtime): trust Windows root certificates (#158)
* fix(runtime): trust Windows root certificates

- Load default TLS roots from the Windows ROOT store.
- Link crypt32 for Windows TLS builds.
- Cover the certificate-store import in cross-build tests.

Co-authored-by: Kayakyx <Kayakyx@users.noreply.github.com>

* fix Windows CA store policy handling

* fix(runtime): cover Windows policy root stores

* fix(runtime): dedupe Windows root stores

* fix(tls): match Windows system CA stores

---------

Co-authored-by: Kayakyx <Kayakyx@users.noreply.github.com>
2026-08-15 19:27:33 -05:00
Chris Tate d1ce6ae7d0 Speed up native-cache CI coverage (#82)
- Memoize immutable native toolchain probes within test workers.

- Preserve strict production-path cache invalidation coverage.

- Shard cache correctness tests without redundant sanitizer runs.
2026-08-02 18:27:29 -05:00
Chris Tate 42fe89f499 fix static fetch semantics and CI reliability 2026-07-30 11:35:00 -05:00
Chris Tate 1d6d011e80 fix(ci): preserve case-sharded coverage
- Route coverage and Vercel E2E outside Vitest file sharding.

- Run the complete frontend coverage sweep once across plain CI slices.
2026-07-28 20:43:16 -05:00
Chris Tate 124ea659ec fix(test): preserve POSIX sandbox workspace paths
- Keep remote workspace reset paths POSIX across host platforms.

- Add targeted Windows CI coverage for Sandbox preparation.
2026-07-28 20:07:34 -05:00
Chris Tate 6d521671df Fix Windows cross-target CLI setup 2026-07-26 17:25:37 -05:00
Chris Tate eed983cdad Fix Windows CLI smoke toolchain 2026-07-26 16:08:30 -05:00
Chris TateandKhaled Ghallab d7b5891b4f Fix scriptc run on Windows
- Normalize Windows paths passed through the TS7 virtual filesystem.
- Emit and launch .exe outputs by default on Windows.
- Add targeted regressions and a Windows GitHub Actions smoke test.

Co-authored-by: Khaled Ghallab <171967089+Khaled-Ghallab@users.noreply.github.com>
2026-07-26 15:50:38 -05:00
8f131ae312 Fix Linux host clang static builds
- Add glibc feature visibility and trailing libm linkage.
- Gate native host clang builds with regression coverage and Ubuntu CI.

Co-authored-by: farangkao <7920378+farangkao@users.noreply.github.com>
Co-authored-by: Swadhin Biswas <107450069+swadhinbiswas@users.noreply.github.com>
2026-07-26 09:36:46 -05:00
Chris Tate e8f04b9054 Parallelize CI: flavor x shard matrix with within-file corpus slicing
- ci.yml runs test (plain|san, 1..3/3) on macos-15; an aggregate job keeps the old "test" check name for anything pinned to it
- each job runs vitest twice: --shard=i/3 over everything but the corpus lanes, then the four corpus lanes with only their case slice — a file lands in exactly one --shard slice, so mixing the axes would silently drop cases
- tests/harness/shard.ts: SCRIPTC_TEST_SHARD="i/n" slices case lists by sha1(name) mod n — stable across corpus growth, every case in exactly one shard, unset means everything
- differential, llvm-differential, npm, and server harnesses slice through it; the llvm tier-floor assertion checks only this shard's floor programs
- shard.test.ts pins the partition contract (union exact, disjoint, key-stable, env-driven default) and stays green with the job-wide env set
2026-07-23 11:13:11 -05:00
Chris Tate d66c36b020 Ship a per-release surface manifest with stable ids and refusal codes
- packages/compiler/surface-manifest.json is generated (pnpm manifest), committed, and shipped in @scriptc/compiler; entries project mechanically from the diagnostics registry, the unsupported-syntax dispatch tables, the stdlib/builtin lowering tables, and the supported-builtin-module list
- every non-static entry carries the SC code the compiler raises for it, and the version spine is the exact published release version
- FENCE_CODES joins the diagnostics registry so factory-minted construct fences are enumerable
- the sampling harness compiles listed-static probes and asserts each sampled non-static entry refuses with exactly its listed code, beside a byte-identical staleness guard
- the release workflow regenerates the manifest, fails on drift, and attaches it to the GitHub release
2026-07-22 22:01:45 -05:00
Chris Tate 9deedfd074 Add the agent-driven release process: docs, sync script, tag job
- RELEASING.md documents the lockstep three-package prepare flow and the marked-changelog convention
- CHANGELOG.md starts with an Unreleased section and the marked 0.0.1 entry that becomes the GitHub release body
- AGENTS.md states repo-wide build/test conventions and defers docs-site specifics to docs/AGENTS.md
- scripts/sync-versions.mjs stamps runtime and compiler from the CLI version; the workflow's sync check now hints at it
- release.yml gains a github-release job that tags v<version> after a successful publish, never gating npm
2026-07-22 21:03:10 -05:00
Chris Tate 60a135f505 Publish with provenance only from a public repository
- npm rejects provenance from internal-visibility repos; the flag now follows repo visibility
2026-07-22 18:38:28 -05:00