Skip to content

Slice (Nexus-JS) v0.10.11

Choose a tag to compare

@siktec-lab siktec-lab released this 11 Nov 06:23
· 68 commits to main since this release
7ab9fae

Slice (Nexus-JS) v0.10.11

Highlights

Wave 1 (v0.10.9) — Iterative ECMA-404 JSON.parse, Process Exit & Worker Isolation (#47, #48, #49, #50, #57, #60)

  • Zero-Recursion Iterative ECMA-404 JSON.parse & JSON.stringify (#47):
    • Replaced recursive JSON parsing in vendor/boa_engine/src/builtins/json/mod.rs and crates/slice-engine/src/intrinsics/simd_ops.rs with an explicit heap-allocated frame stack (ParseFrame::ObjectWaitValue, ParseFrame::ArrayWaitElement, ReviverFrame), safely handling 512+ levels of nesting without native thread stack overflow (RangeError: Maximum JSON nesting depth (512) exceeded) while enforcing strict ECMA-404 control-character rejection (0x00..=0x1F), valid UTF-16 surrogates, and __proto__ own-data-property definitions.
    • Added an ASCII zero-escape fast path (!b.iter().any(|&c| c < 0x20 || c == b'\\' || c >= 0x80)), making common JSON key/value parsing 6–18% faster in microbenchmarks.
  • process.exit(code) & process.exitCode Propagation (#48):
    • Propagated non-zero process.exit(code) (__SLICE_PROCESS_EXIT__:N), process.exitCode, and "beforeExit" / "exit" lifecycle hooks cleanly to the host CLI exit status across Tier-0 and Tier-2 execution without printing a spurious stack trace.
  • Unhandled Promise Rejection Detection (#49):
    • Added per-promise handled tracking to the Boa job queue alongside process.on("unhandledRejection", ...) dispatch and non-zero exit enforcement when unhandled rejections remain after draining the event loop.
  • Worker Threads Deterministic Clock & worker.terminate() Semantics (#50, #57):
    • Propagated deterministic virtual clock seeds (Date.now(), new Date(), performance.now()) into node:worker_threads worker isolates.
    • Made worker.terminate() resolve with exit code 1 (Promise<1>) and fire "exit" once without emitting a spurious "error" event on normal process.exit(0).
  • CLI Entry-Arg Ordering & Sandbox Error Sanitization (#60, #61):
    • Supported slice run <entry> [flags] flag ordering after the entry path and redacted host filesystem paths from sandbox violation diagnostics.

Wave 2 (v0.10.10) — node:fs VFS Hardening, node:stream & node:child_process (#51, #56, #62)

  • CoW VFS Symlink Loop Guard (ELOOP), Binary readdir, & fs.StatWatcher (#51):
    • Added 32-hop symlink resolution cycle detection (ELOOP: too many symbolic links encountered), readdirSync(dir, { encoding: "buffer" }) returning Buffer instances, dirent.parentPath / dirent.path, and EventEmitter-backed fs.watchFile / fs.unwatchFile polling triggers on VFS mutations.
  • node:stream ObjectMode, Async Pipelining, stream/web Bridges & Multi-Byte StringDecoder (#56):
    • Preserved null/undefined/falsy values in Duplex/Transform/PassThrough objectMode, added async Transform._transform backpressure queuing and Readable.from(asyncIterable) pumping, implemented Readable.toWeb/fromWeb and Writable.toWeb/fromWeb, and added Stateful UTF-8 / UTF-16LE / Base64 multi-byte boundary buffering in node:string_decoder.
  • node:child_process Sandboxed AbortSignal, timeout, maxBuffer & IPC (#62):
    • Added AbortSignal (ABORT_ERR), timeout (ETIMEDOUT + killSignal), maxBuffer (ERR_CHILD_PROCESS_STDIO_MAXBUFFER), input stdin piping, and virtualized .send()/.disconnect() IPC channels to exec/execFile/spawn/fork while preserving strict OCap denial by default.

Wave 3 (v0.10.11) — DOMException, AsyncLocalStorage, WebCrypto Asymmetric/KDF, Intl, & WinterTC/Node Polish (#52, #53, #54, #55, #58, #59)

  • Standard DOMException Prototype & Legacy Code Table (#52):
    • Implemented spec-compliant DOMException(message, name) inheriting from Error.prototype (instanceof Error === true) with full W3C legacy numeric code constants (INDEX_SIZE_ERR = 1 .. DATA_CLONE_ERR = 25), wired across AbortController.abort(), AbortSignal.abort(), AbortSignal.timeout(), and structuredClone().
  • Async-Propagating AsyncLocalStorage & AsyncResource (#53):
    • Propagated AsyncLocalStorage store snapshots across Promise.prototype.then/catch/finally microtasks, queueMicrotask, setTimeout, setInterval, setImmediate, and process.nextTick.
  • Timer ref()/unref()/refresh() Handles & timers/promises (#54):
    • Returned Timeout / Immediate objects with .ref(), .unref(), .hasRef(), .refresh(), and [Symbol.toPrimitive](); excluded unref'd timers from keeping the event loop alive; and implemented node:timers/promises (setTimeout, setImmediate, setInterval async iterator, scheduler.wait/yield) with AbortSignal cancellation.
  • Pure-Rust Intl Suite (#55):
    • Upgraded Intl.DateTimeFormat (timeZone, dateStyle/timeStyle, month/weekday/hour12), Intl.NumberFormat (style: "currency" | "percent" | "unit", notation: "compact", signDisplay), Intl.PluralRules, Intl.RelativeTimeFormat, Intl.ListFormat, Intl.Segmenter (granularity: "grapheme" | "word" | "sentence"), and Intl.DisplayNames.
  • Real WebCrypto Ed25519, X25519, RSA-OAEP/PSS/RSASSA-PKCS1-v1_5, PBKDF2, HKDF & node:crypto Key Objects (#58):
    • Wired crypto.subtle to pure-Rust ring, ed25519-dalek, and x25519-dalek implementations (generateKey, sign, verify, encrypt, decrypt, deriveBits, deriveKey, importKey/exportKey for "raw", "pkcs8", "spki", "jwk", wrapKey/unwrapKey), plus node:crypto KeyObject, createPublicKey/createPrivateKey/createSecretKey, generateKeyPairSync, diffieHellman, and hkdfSync.
  • WHATWG URL Setter Validation, EventTarget Options, FormData/Blob Files, & node:path/node:events/node:util (#59):
    • Added full URL component re-parsing (protocol, username, password, host, hostname, port, pathname, search, hash), URL.canParse(), URLSearchParams.prototype.sort()/.size, EventTarget once/passive/signal/capture/stopImmediatePropagation(), File-backed FormData, path.win32.*, events.once()/events.on(), and util.parseArgs/isDeepStrictEqual/stripVTControlCharacters.

Benchmark Summary (v0.10.11 vs Bun v1.4.4, Deno v2.9.8, Node.js v27.0.0-alpha)

  • 33 / 33 Workloads Won in --warm pooled isolate mode (1.85x – 36.60x faster than Bun; 2.64x – 10.58x faster than Node.js).
  • Single Isolate Cold-Start: 0.98 us Min / 1.23 us P50 / 2.03 us P99 (1.47 ms for 1,000-tenant MicroVM swarm at 9.70 MB total RSS).
  • slice serve Multi-Tenant HTTP/1.1 Keep-Alive: 153,174 req/s (Tier-0 CAS) / 145,192 req/s (Tier-1 WinterTC), 1.52x faster than Bun.serve and 2.80x faster than Node.js.