Releases: vercel-labs/scriptc
Releases · vercel-labs/scriptc
Release list
v0.2.4
0.2.4
Features
- Native Maps and Sets accept boolean, bigint, and mixed-value keys. Collection construction and storage preserve identity, insertion order, and iteration behavior.
Performance
- Numeric loops and byte access need less runtime work. Integer facts flow through loops and typed-array access, while Buffer and DataView numeric operations avoid redundant conversions and proven bounds checks.
- Native text, collection, and checked-value paths reduce ownership and allocation overhead. String construction writes directly to final storage, and safe input borrowing, value reuse, and cycle cleanup reduce intermediate work.
Fixes
- Windows toolchain assets resolve through linked packages. Native launches locate installed assets from the physical package manifest path.
v0.2.3
0.2.3
Features
- Node 24 filesystem and URL coverage expands. Filesystem support adds capacity queries, link handling, timestamps, and file URL byte conversion with platform options; URL handling adds authority, protocol, and mutation behavior.
- Web Streams support covers more workflows. Writable and readable streams add controller and reader operations,
tee, pipelines, and streaming encoding. - Embedded Node compatibility adds module and utility APIs. CommonJS and ESM metadata, diagnostics channels, deep equality,
util.types,util.styleText, text and system error utilities, MIME utilities, and no-error assertions gain support. - Native Set construction accepts supported collection iterators.
Performance
- Compiler analysis avoids repeated metadata and tree work. AST child lookups, class and record metadata, graph propagation, and exception analysis are reused or streamlined.
- Native array iteration does less work. Optimized loops preserve live tuple iteration behavior.
Fixes
- Native values keep valid lifetimes across helper and collection operations. Array borrowing, map reads, string concatenation, and helper calls preserve values for their full use.
- TypeScript runtime package sources emit consistently.
v0.2.2
0.2.2
Features
- More Three.js CPU workflows compile natively and to WASI. Support expands across procedural geometry, curves, animation blending, mesh deformation, material and texture data, in-memory model loading, and CPU node graphs. Compiled libraries can send geometry, material state, and resource lifecycle notifications to an external rendering host.
- Stored Map and Set iterators compile statically. Native cursors support
next(), function arguments,for...of, spreads, and mapper-lessArray.fromwhile preserving live collection behavior and reference identity. - Native filesystem and crypto support expands. Descriptor I/O and FileHandle vector and control operations compile statically, alongside scrypt, HKDF, and additional SHA-2 algorithms. Embedded packages gain the corresponding Node 24 behavior.
- Node 24 URL, environment, and text utilities gain native support.
URL.canParse,URL.parse, URL JSON serialization,util.parseEnv,process.loadEnvFile,TextEncoder.encodeInto, and buffer validation and transcoding compile without an embedded JavaScript engine. - Embedded packages support more asynchronous event and timer flows.
events.onadds buffered iteration, cancellation, close events, backpressure, and listener cleanup;events.onceaccepts EventTarget inputs and cancellation, and abort listeners support disposal. Promise timers and scheduler operations add cancellation and reference controls, with buffered interval iteration and native timer-handle lifecycle behavior.
Performance
- Compilation avoids repeated queries, scans, and allocations. Frontend type queries and JavaScript binding analysis, native IR traversal, union transformations, artifact dependency collection, and serialization do less repeated work.
- Native build preparation overlaps independent work. Compiler fingerprinting and native-driver discovery run concurrently, with more bounded parallel fingerprint reads while preserving cache identity and invalidation behavior.
Fixes
- Static JavaScript workflows preserve more class and callable behavior. Inferred class fields, inherited members, method dispatch, callable identity, collections, and async values retain their supported state across compiled package boundaries.
- Integer-boundary inference accounts for both zero signs. Division and powers involving zero no longer produce unsafe integer proofs for negative-zero inputs; safely clamped results retain their supported proofs.
- Embedded Node utilities preserve more input and lifecycle behavior. Argument parsing and callback/promise adapters handle more Node 24 validation, metadata, and error cases. EventEmitter preserves once-listener reentrancy, symbol names, and error-monitor ordering, while StringDecoder handles more input views and split encoding boundaries.
v0.2.1
0.2.1
Features
- More Effect 3 and Effect 4 programs compile statically. Support expands across tested async and concurrent flows, services and layers, resource management, streams, schemas, and collections in the published packages.
- Three.js CPU workloads cover more geometry and animation. Geometry merging, instancing, and keyframe interpolation compile without an embedded JavaScript engine.
- Typed-array constructors and prototype methods preserve more JavaScript behavior. Native compilation supports constructor aliases, shared backing storage, chained indexed assignments, and mutable prototype methods with receiver dispatch.
Fixes
- Native installs are smaller and more portable. GNU/Linux compiler distributions support glibc 2.34 or newer and use statically linked LLVM helpers. The compiler bundles its host runtime; cross-target runtime packs are optional project dependencies pinned to the compiler version.
- Native values retain identity across more typed and untyped boundaries. Collections, class instances, inferred arrays, and mixed JavaScript return values preserve their supported storage and dispatch behavior.
- Effect platform callbacks and native streams preserve their state. Expanded lowering retains callback behavior, and promise storage keeps the layout required by cycle collection.
v0.2.0
0.2.0
Breaking changes
- LLVM is the only code generation backend. C emission, the debugging C backend, and automatic C fallback have been removed. Replace
--backend=cwith the default backend, use--emit=llvmto inspect generated code, and change library profiles with"emission": "c"to"emission": "llvm".--emit=cis no longer accepted. - The installed CLI is a native executable. npm installs the matching platform package on supported macOS, Linux, and Windows hosts. Native compilation, compile-time evaluation, and native execution no longer require Node. Node 24 or newer is still required for npm installation, the JavaScript compiler API, source development, and
scriptc runof WASI modules. Executable linking still requires the target's linker and SDK or sysroot; Zig remains required for the targets that use it.
Features
- scriptc ships a self-hosted native compiler. The CLI bundles the native TypeScript 7 parser and checker, LLVM helper, precompiled C runtime pack, declarations, and compile-time evaluator. Standalone compiler archives are available alongside npm packages.
- Published Effect generators compile statically. With
--npm-static=effect, the testedEffect.gen,Effect.succeed,Effect.log, andEffect.runPromiseflow compiles from the unmodified package without an embedded JavaScript engine. Unsupported reachable Effect code still produces diagnostics. - Three.js CPU workloads compile natively and to WASI. Static package compilation supports math, scene graphs, cameras, geometry, meshes, materials, and tested raycasting and collision queries. WebGL rendering, DOM integration, and native graphics windows remain unsupported.
- WebAssembly libraries expose callable exports and host imports. WASI Preview 1 reactors support library profiles, synchronous host callbacks, explicit memory ownership, and independent module instances. Browser hosts supply their own WASI adapter and rendering integration.
- Native FFI supports more library interfaces. Static
node:ffibindings add exact 64-bit and pointer ABIs, native memory views, reusable callback pools, and Darwin framework linking. - More ordinary JavaScript stays native. Support expands across identity collections, numeric typed arrays, property descriptors, local class factories, callable properties, inherited fields and accessors, generator and async methods, and runtime-length argument spreads into supported signatures.
Performance
- Compilation does less repeated frontend work. Syntax metadata, property lookups, library signatures, and recursive class analysis are reused, while optional-value analysis and lowering avoid redundant traversal and copying.
- LLVM output shares recursive value converters. Deduplicated helpers reduce generated code and the work needed to produce native objects.
- Startup avoids unnecessary work, and release artifacts are smaller. Host libc detection is cached, the JavaScript API loads TypeScript 5 only when needed, and release runtime packs omit development debug payloads.
Fixes
- Untyped JavaScript boundaries preserve more native values. Class state, shared arrays, nullable fields, constructor results, collection identity, and typed-array backing storage retain their supported semantics across calls and storage.
- Static library builds honor explicit package selections. Packages named in a library profile's
npm_staticlist are attempted even when they do not ship declarations. - Terminal and process integration handles more native behavior. Stored process streams, terminal signals, and exception handlers that resume queued work are supported across the tested native paths.
v0.1.7
0.1.7
Features
- Development builds support native source debugging.
--optimization=devadds TypeScript and JavaScript source locations across the C and LLVM backends, with source-named variables in LLVM builds. - More Math operations compile statically. Additional constants and methods include hyperbolic functions,
clz32,fround,imul,expm1, andlog1p. - Static Promise handling supports rejection callbacks.
Promise.prototype.thenaccepts both fulfillment and optional rejection handlers, including returned promises. - Static compilation accepts more package layouts. Installed entries can compile their own TypeScript and JavaScript imports, and CommonJS packages with safe export prologues remain eligible for static compilation.
- Fixed tuple spreads compile in tuple literals. Const tuple inference is preserved when checked with
satisfies. - Dynamic
globalThisexposes Node host globals. Escaping through the global object initializes the same Node globals used by embedded modules.
Performance
- Async and generator fibers commit stack memory on demand. They retain their existing stack capacity while using less committed memory.
- Development builds compute compiler fingerprints faster. Parallel fingerprint reads preserve the existing cache identity and invalidation behavior.
Fixes
- Caught and rejected values preserve JavaScript object classification. Native exception handling distinguishes objects from primitive values across catch and promise paths.
- TypeScript project settings and Node declarations are preserved. Built-in default imports honor effective project options, and
RequestInforemains available across imported sources. - Optional chains and dynamic option records retain supported values. Array callbacks inside optional chains, narrowed optional receivers, and records containing abort handles compile correctly.
- Compiler analysis handles more edge cases safely. Deep or shared type graphs no longer overwhelm diagnostics, and property names spelled
argumentsare not treated as reads of the special binding.
v0.1.6
0.1.6
Features
- Static Array behavior covers construction, mutation, indexing, flattening, splicing, and joining. Array construction and iterable conversion,
fill,copyWithin, relative-index coercion,flat, splice insertion, and join coercion now compile with JavaScript semantics. - Static Object and String operations expand. Own-property checks, prototype tags,
String.prototype.at,codePointAt, andsplitcoercions now compile with Node-compatible behavior.
Performance
- Array, string, and terminal operations use fewer resources. Array comparisons and string operations allocate less, fibers reuse stacks and release cached memory while idle, and terminal dimensions come directly from native streams.
v0.1.5
0.1.5
Features
- Static HTTP support covers more client and server behavior. The
node:httpsurface adds request and response controls, timeout and event handling, connection shutdown behavior, and stricter header validation. - Static numeric APIs expand.
Float64Array, indexed compound assignments, and additional analytic and remainingMathfunctions compile natively. - Array and string search calls handle more JavaScript inputs. Static
includes,lastIndexOf, and positioned string methods accept omitted and primitive search values while preserving position coercion. - Published Effect modules can compile statically. The npm-static path follows reachable exports through package modules and prunes unused package code.
- Executable stripping is available as an opt-in build option.
Performance
- LLVM emits faster numeric operations. Proven integer arithmetic and numeric remainder use direct operations, and numeric array reads avoid redundant boxing, retains, and temporary records.
Fixes
- Static JavaScript coercions preserve Node behavior across more call forms. String padding and search,
Numberconversion, and narrowed string and buffer calls now handle unions, wrappers, objects, nullish values, and omitted arguments correctly. - Dynamic islands load more legacy packages. Redis 6 entry points and callable
EventEmitterusage work with the island runtime. - Published LLVM helpers retain executable permissions.
- Switching build modes preserves reusable artifacts.
v0.1.4
0.1.4
Features
- Static module interoperability expands.
node:modulecoverage, CommonJS factory exports, and statically analyzable literal dynamic imports compile through the native module graph. - Node built-in functions work as values. Supported
node:path,node:fs, and other built-in functions can be stored and passed around while preserving static calls. - Static call lowering handles more JavaScript shapes. Overloaded callable specialization, fixed-tuple argument spreads, union receiver calls, and loose equality now compile natively.
- Compression APIs expand. One-shot and callback-based zlib codecs compile statically.
- Child-process APIs gain IPC and callback coverage.
forksupports parent-child messaging,execFilesupports inline UTF-8 callback options, and shell output can be captured. - Static HTTP servers enforce Node's Host rules and support trailers. HTTP/1.1 requests require
Hostby default and return Node-compatible 400 responses, with opt-out and HTTP/1.0 handling preserved; incoming chunk trailers expose raw and distinct values, while outgoing trailers support framing and streaming. - Filesystem and URL support expands. Static filesystem support adds synchronous buffer overloads, async
realpath,lstatmetadata,readdirwithDirent, and descriptor operations; URLs add credential, origin, port, and hash behavior. - Date, process, and event APIs gain static behavior.
Date.parse, writableprocess.exitCode, and scoped computedEventEmitternames compile with Node behavior. - Static Set construction accepts readonly tuple seeds. Supported readonly tuples initialize native Sets while preserving single evaluation and insertion order.
Performance
- LLVM bitwise operations use native integer instructions. Numeric JavaScript bitwise operators now lower to
i32operations on the LLVM backend.
Fixes
- Windows and Linux runtime builds cover more host details. Windows executables support GUI subsystem selection and installed CMake generators, Windows runtimes include native clock and sleep shims, and GNU runtime packs preserve glibc 2.36 compatibility.
- Static npm resolution follows package import maps. Package-scoped imports use edge-specific conditions, and fallback Node declarations include
RequestInfowithout widening supported fetch inputs. - HTTP request parsing bounds and validates trailers. Header and trailer parsing enforce byte and field-count limits, and trailer data is safely discarded when handlers respond before the request body finishes.
v0.1.3
0.1.3
Features
- BigInt compiles natively. BigInt literals, arithmetic, comparisons, conversions, storage, byte-buffer and
DataViewoperations, and width boundaries now preserve Node behavior across the C and LLVM backends. - Static crypto utilities expand. Hashes, HMACs, PBKDF2, random fills and integers, timing-safe equality, and one-shot hashing compile through the native
node:cryptosurface with Node-compatible errors. - Child-process stdin is writable.
child.stdinsupports native writes, backpressure, ending, destruction, and lifecycle and error events across the C and LLVM backends. - Commander 15 compiles statically. The npm-static path now preserves the declaration and runtime behavior needed by Commander 15 command actions.
- TypeScript workspace sources compile statically. Source-only workspace package entries now resolve through the program module graph while retaining the existing JavaScript package boundary.
Performance
- WASI release binaries are smaller. Release links strip debug sections while development output retains its metadata.
Fixes
- Generated JSON record keys are valid. Escaped and terminating property names now emit correctly in both native backends.
- Windows console output preserves UTF-8. Attached consoles use UTF-8 without changing redirected byte output.
- Nested recursion and discarded conditionals lower correctly. Mutual nested function references are initialized before capture, and discarded conditional expressions retain lazy control flow.
- Library archives retain section granularity. Per-function and per-data sections now allow consumers to garbage-collect unreferenced archive members.