0.3.2
Features
EventTarget,EventandCustomEventare supported, with Node's dispatch order,once/passive/signaloptions and listener error reporting.AbortSignaluses the same implementation, andevents.errorMonitorandevents.addAbortListenerare supported.Promise.allSettledandPromise.anyare supported in typed and JavaScript code, with Node's microtask order,AggregateError, andPromiseSettledResultrecords. JavaScript combinators adopt thenables.yield*delegates to arrays, strings, Sets and Maps, forwards typednextvalues,return()andthrow(), and a finished generator's.valuereads asundefined.- The global console is complete:
assert,count/countReset,dir/dirxml,group*,table,time/timeLog/timeEnd,clearandprofile/timeStampprint Node's output. node:osis complete, andpath.parse,path.formatandpath.matchesGlobare supported for the posix and win32 families.util.inherits,util.deprecate,util.callbackifyandutil.debuglogfollow Node 24, includingNODE_DEBUG,process.noDeprecationandprocess.throwDeprecation.LifetimeRegionin@scriptc/experimentalfreesProgramLifetimeinstances one generation at a time. A watch-style compiler benchmark stays at 190 MB after 10 builds.
Performance
- Short-lived number records and objects live in the function's frame. Records and small class instances with number and boolean fields that are only read, updated by their own methods, or returned unchanged are not heap-allocated, including results of functions that return a fresh object.
- Maybe-missing number reads stay unboxed, and directly called functions returning
number | undefinedreturn the tag and payload in registers. - Arrays and objects use less memory.
boolean[]stores one byte per element, small appended arrays keep their first elements in the array's own block, and cycle-capable objects carry an 8-byte header instead of 16 bytes. - Sorting with a recognized numeric comparator sorts by key without calling the comparator, for
number[]and arrays of records or class instances. - Regex
replace,matchand capture reads are faster. Compiled matchers write replacements directly, and captures that are only compared or converted to numbers are not copied into strings. for...in,Object.keysandObject.entriesover values typedunknownoranybuild native arrays from the record layout or the object's own keys.- Calls through function-typed class fields box the receiver only when the callee reads
this. - Indexed non-ASCII string scans,
split(""), template literals andjoinare faster.
Fixes
- Strings keep lone UTF-16 surrogates. Strings are stored as canonical WTF-8, so lone surrogates survive literals,
split(""),charAt,slice,fromCharCodeandJSON.parse, and output streams write them as U+FFFD as Node does. - A
varread before its first store readsundefined, and classes used before their declaration runs throw aReferenceError. - Reflection over typed values seen as
unknownmatches Node:insees prototype members,for...inwalks class instances, typed records work as prototypes, andJSON.stringifyaccepts array replacers. - Microtask and event order match Node for
Promise.all,Promise.race, async generator returns, and fork IPCexit,disconnectandcloseevents. - Module initializers that only
++or--a binding run. - Native program objects use runtime ABI v20. Array and object layouts changed, so external object consumers must link the matching v0.3.2 runtime pack; the versioned marker rejects incompatible runtime objects at link time.