0.0.33
Features
- Foreign-thread native callbacks are marshalled to the event loop. FFI format 5 adds
invoke: "foreign"for retained, context-bearing,voidcallbacks. Thread-safe generated trampolines copy scalar/string/byte arguments into plain staging memory, wake the process loop, and return immediately; the loop delivers one callback per turn on the script thread with ref'd registration liveness, concurrent-producer FIFO safety, explicit release, throw propagation, and clean shutdown across both backends. - Native callbacks can be retained and explicitly released. FFI format 4 adds
lifetime: "retained"registrations and pairedreleasedescriptors that reuse the original function-pointer trampoline. Registrations pin captured closures until the same function value is released, count duplicate registrations, support multiple context-bearing registrations and raw single-slot replacement, defer callback throws through later FFI pump calls, and clean up live registrations at process exit across both backends. - Native callbacks copy in strings and byte spans. FFI format 3 adds callback-only
cstringparameters plus length-delimitedstringandbytesparameters. Trampolines in both backends copy native memory into owned scriptc values, decode malformed UTF-8 with U+FFFD replacement, preserve embedded NUL bytes in spans, and trap precise invalid null pointers before invoking the closure. Array.prototype.filteraccepts JavaScript-truthy predicate results. Static predicates may return strings, numbers, references, or supported unions and now keep elements according to JavaScript'sToBooleanrules instead of requiring a boolean result. Checked-dynamic calls without a predicate reach the runtime's callback error, while predicates whose return value was erased tovoidrefuse rather than silently producing the wrong array.
Performance
- Repeated builds avoid redundant compiler work. Validated native-toolchain metadata and same-output artifacts persist across CLI processes with dependency and content checks that preserve cache invalidation; Node 24's bytecode cache reduces CLI startup work, frontend type lowering is memoized and checker prefetch avoids unused AST queries, and library profiles gain a fast
optimization: "dev"posture plusSCRIPTC_TIMING=1phase diagnostics. The compiler CLI now requires Node 24 or newer.