* 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.
* 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.
* 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
- Add an explicit executable dev posture using native -O0 builds
- Split large LLVM programs into parallel, independently cached objects
- Preserve release cache compatibility and safe single-TU fallbacks
* perf: lazy-load the compiler from the CLI
- Serve help and version from a lightweight bootstrap and route exact executable cache hits before loading the compiler graph.
- Validate routed hits against compiler, frontend, toolchain, and native dependency proofs with portable cache publication.
* fix: repair lazy executable cache routes
* feat: support wasm32-wasi as a production target
- Add production LLVM WASI codegen with a 32-bit ABI, coroutines, and dynamic modules
- Integrate WASI builds and execution into the CLI with capability diagnostics
- Add differential coverage and document the fourth production target
Co-authored-by: Albert <57402359+bulatovv@users.noreply.github.com>
* fix: address wasm target review findings
* fix WASI guest paths and fetch alias detection
* fix WASI async bridge and fetch detection
---------
Co-authored-by: Albert <57402359+bulatovv@users.noreply.github.com>
- 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>
- Add a strict versioned manifest and direct C ABI lowering for both backends.
- Link declared native inputs through the CLI and compiler APIs with precise diagnostics.
- Cover the ABI under plain and sanitized integration tests and document its contracts.
- `scriptc -v` / `--version` prints the installed version, read from the package manifest so a release build and a source checkout answer the same way. It previously fell through to the compile path and crashed trying to read `-v` as an entry file.
- An unknown flag or a missing flag value now prints one line naming what was wrong, followed by usage. parseArgs' ERR_PARSE_ARGS_* used to escape to the top level and paint a Node stack trace over the terminal.
- Reworded `--backend` help: llvm is the default and the output that ships, c is the readable reference backend for inspecting what the compiler produced.
- compileLibrary runs the --npm-static eligibility bar automatically over every bare specifier the graph exposes (opted-in packages' own import and top-level require edges included, iterated to a fixpoint) — an eligible package compiles statically into the library graph, and every fallback the shared frontend records refuses as SC4013 naming the package, the specific failed bar, and the vendor-or-drop remedy (with the profile's SC4013 teaching riding the hint), never SC1010/SC2013's executable-lane teachings.
- requireInitStmt now emits the guarded %init call for a bare require naming another opted-in package: the dep's module body never ran before (NULL-closure crash at first use), a latent npm-static gap on both lanes that the library fixpoint hits immediately; the executable lane never exercised an inter-package require.
- Contract facts exclude statically-compiled npm files (their .d.ts is dropped by construction, so no npm declaration can name a wire-contract type) while their bytes keep joining source_hash/build_id through moduleOrder; the sidecar stays byte-deterministic and a package-file edit flips both identity hashes.
- Builtins keep their story under the npm posture: async_free builtin imports compile alongside npm code, event-loop surfaces still refuse SC4005, no new fence.
- New fixtures npm-static, npm-refuse, and contract-npm vendor fake packages per the tests/fixtures/npm precedent; the K12 suites assert the compile and refusal sides on both emissions and the contract suite covers the identity-hash implications.
- lib-contract.ts reads the entry's exported types, function signatures, and the ratified exported-const conventions (modelUnbound/msgUnbound/appearanceMsg/chromeMsg/envMsgs) from the AST in statement order, never the checker
- sidecar.ts projects them into the schema's closed vocabulary: declaration-ordered type table with synthesized <Container>_<member> records, five-family msg descriptors (number-first pins number_bytes, bytes-first takes the record family), helper table with the arena bit, channels, and the canonical abi.exports order
- build_id follows the schema's worked definition (compiler version, profile bytes, sorted canonical module graph) and lands on IrLibSection.identity so both backends emit the getters from the one value the sidecar records; the getters are pure constant returns with no entry prologue — poisoned-guard exempt, callable pre-init and post-trap
- not-yet facts emit the stated absent forms: integer_slots [] with every numeric slot f64, deterministic computed by a conservative ambient-surface scan (moduleLibNondeterministicSurface), async_free structural behind SC4005
- sidecar-validate.ts implements the V1-V14 self-check run before writing; unprojectable designations refuse as SC4009 naming the declaration; the CLI prints the sidecar path beside the archive
- IrModule.core lands the resolved export map + mode-provided symbol names on the IR; both emitters generate the external ccc wrappers, the re-runnable init entry (globals released and zeroed, error-vt stamps, %main, escaped-exception check), sink registration, and the optional reset/collect entries from the same facts
- marshalling wrappers delegate to scr_core.c helpers (str/bytes in-copy, arena-out), so the two emissions are identical by construction; both arena postures emit from resultResetSymbol
- compileCoreArchive builds <name>.core.a: program TU + the narrowed core runtime set (no scr_async/scr_child) + IR-gated pure-data units, all -DSCR_CORE; vendored zlib objects keep the libc/libm-only undefined-reference contract on hosts
- profile-mapped exports seed lowering reachability (coreRoots) so uncalled exports stop dead-stripping on the core path
- emitted family-4 traps (OOM, invalid union tag, bad key) route through scr_trap in both backends
- CLI verb: scriptc core --profile <file> [-o out]
- A type-error stop prints the same code frames a build prints
- The import-site stop renders its diagnostics below the blocker table
- Coverage is the first command reached for; the verdict line alone swallowed the fix