v0.2.0
Added 7
- scriptc ships a self-hosted native compiler bundling 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` for Effect.gen, Effect.succeed, Effect.log, and Effect.runPromise without an embedded JavaScript engine
- Three.js CPU workloads compile natively and to WASI supporting math, scene graphs, cameras, geometry, meshes, materials, raycasting, and collision queries
- WebAssembly libraries expose callable exports and host imports with WASI Preview 1 reactors supporting library profiles, synchronous host callbacks, explicit memory ownership, and independent module instances
- Native FFI supports more library interfaces with static `node:ffi` bindings adding exact 64-bit and pointer ABIs, native memory views, reusable callback pools, and Darwin framework linking
- Support expands for 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
Changed 4
- The installed CLI is now a native executable with npm installing the matching platform package on supported macOS, Linux, and Windows hosts
- Compilation reuses syntax metadata, property lookups, library signatures, and recursive class analysis while optional-value analysis and lowering avoid redundant traversal and copying
- LLVM output shares recursive value converters with deduplicated helpers reducing generated code and work needed to produce native objects
- Startup avoids unnecessary work with host libc detection cached, the JavaScript API loading TypeScript 5 only when needed, and release runtime packs omitting development debug payloads
Fixed 3
- Untyped JavaScript boundaries preserve more native values including class state, shared arrays, nullable fields, constructor results, collection identity, and typed-array backing storage
- Static library builds honor explicit package selections in library profile's `npm_static` list even when packages do not ship declarations
- Terminal and process integration handles more native behavior with stored process streams, terminal signals, and exception handlers that resume queued work
Removed 1
- Remove C emission, debugging C backend, and automatic C fallback, keeping only LLVM as the code generation backend
From scriptc
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.