Skip to content

Releases

Slice (Nexus-JS) v0.10.12

Choose a tag to compare

@siktec-lab siktec-lab released this 12 Nov 02:36
8aa4054

Slice (Nexus-JS) v0.10.12

Highlights

Security & Sandbox Hardening (#71)

  • Deny-by-Default Filesystem OCap & CoW VFS Tombstone Isolation:
    • Enforced strict deny-by-default filesystem capability tokens across CapabilityToken::pure_compute(), Slice.evalSandbox, slice eval, slice serve, and slice mcp unless explicit --allow-read / --allow-write flags or slice.toml capabilities are granted (slice test retains isolated /tmp and /vfs scratch access).
    • Added copy-on-write VFS deletion tombstones (BOA_VFS_TOMBSTONES) so unlinkSync, rmSync, rmdirSync, and renameSync mask entries in memory without deleting underlying host filesystem files, with O(1) rollback on Slice.restore().
  • Asymmetric Cryptography Hardening (RSA 2048..8192 & RFC 7748 X25519):
    • Removed static RSA-2048 keys and disabled unbounded runtime RSA/DSA prime generation in the multi-tenant edge sandbox (ERR_CRYPTO_UNSUPPORTED_OPERATION / NotSupportedError / ERR_INVALID_ARG_VALUE).
    • Implemented dynamic 2048 to 8192-bit ASN.1 DER (PKCS#8, PKCS#1, SPKI) and JWK RSA import/export plus ring-backed RSASSA-PKCS1-v1_5 and RSA-PSS (SHA-256, SHA-384, SHA-512) signing and verification across node:crypto and crypto.subtle.
    • Implemented constant-time RFC 7748 X25519 key generation, PKCS#8 v1/v2 + SPKI + JWK + raw codecs, crypto.diffieHellman, and crypto.subtle X25519 (deriveBits, deriveKey) via x25519-dalek with constant-time low-order public point rejection.

Runtime Performance & Prelude Sharding (#62, #69, #71)

  • WinterTC fetch Hot-Path Latency Optimization (#62):
    • Optimized SliceIsolate::dispatch_http_request with lazy header materialization, fast-path synchronous Response extraction, and conditional event-loop draining, lifting Tier-1 WinterTC HTTP/1.1 keep-alive throughput to 154,737 req/s (6.46 us/req).
  • Runtime Hot Paths, JSON Fast Paths, VFS Slab, & Shard 18/19 Split (#69):
    • Accelerated JSON.parse / JSON.stringify fast paths and object shape property lookups in boa_engine, optimized node:fs VFS slab paths, and split 18_intl.js from 19_process_cli.js so CLI and server workloads that do not use Intl skip evaluating internationalization tables.

Compiler Diagnostics & Documentation (#60, #70, #71)

  • Multi-Frame Source-Mapped Stack Traces & Class Method Spans (#60):
    • Extended //#[SLICE_SMAP_V1] source mapping in slice-cas and stack formatting in slice-engine to resolve multi-frame uncaught call stacks and class/object methods back to original TypeScript files and line numbers, and aligned pre-fused SLICEBC\x01 prelude line offsets.
  • Documentation & Compatibility Matrix Alignment (#70, #71):
    • Streamlined README.md, added unified documentation navigation (docs/README.md), removed stale internal specs, and aligned COMPATIBILITY.md and docs/ with verified runtime behavior.

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

  • 33 / 33 Workloads Won in --warm pooled isolate mode (33/33 vs Deno, 33/33 vs Node.js, and 29/33 cold one-shot vs Bun).
  • Single Isolate Cold-Start (Linux x86_64): 0.94 us Min / 1.24 us P50 / 2.10 us P99 (1.50 ms for 1,000-tenant MicroVM swarm at 4.0 KB per-tenant compartment footprint).
  • slice serve Multi-Tenant HTTP/1.1 Keep-Alive: 154,737 req/s (Tier-1 WinterTC) / 148,865 req/s (Tier-0 CAS), 1.60x faster than Bun.serve and 2.71x faster than Node.js.
  • Security Verification: 5 / 5 PASS across OCap, SES, Fuel, SSRF/DLP, and MPK containment vectors.

Slice (Nexus-JS) v0.10.11

Choose a tag to compare

@siktec-lab siktec-lab released this 11 Nov 06:23
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.

Slice (Nexus-JS) v0.10.7

Choose a tag to compare

@siktec-lab siktec-lab released this 10 Nov 05:23
ea7c70c

Slice (Nexus-JS) v0.10.7

Highlights

  • Guest Slice.evalSandbox Memory Cap & Heap Accounting (#42):
    • Added memory and maxMemoryBytes serde aliases to SandboxEvalOptions::memory_bytes so guest Slice.evalSandbox(code, { memory }) honors explicit byte caps instead of falling back to the 16 MB default.
    • Stopped permanently deducting freed child JS heap allocations from the parent realm's BOA_KV_MEM_BUDGET after the child Slice.evalSandbox isolate exits, while preserving parent_rem_mem clamping during child execution.
  • Proportional fuelUsed Telemetry for while and do...while Loops (#43):
    • Tracked cumulative loop_iterations_executed in boa_engine::vm::RuntimeLimits on every IncrementLoopIteration opcode and charged (loop_iters / 250).max(1) in finish_boa_compartment_execution, aligning while and do...while fuel reporting with for loops.
  • Dedicated Egress DLP Violation Variant (#44):
    • Added SandboxViolation::EgressSecretLeakBlocked { tenant_id } (Egress DLP Violation (EGRESS_SECRET_LEAK_BLOCKED): Compartment '<tenant_id>' blocked from exfiltrating a registered audit secret) across outbound HTTP, WebSocket, and TCP/UDP socket guards instead of reusing EnvAccessDenied.
  • Single-Line Slice.evalSandbox Error Location & Deduplication (#45):
    • Deduplicated location parentheticals in finish_boa_compartment_execution when raw_err or stack frames already include (unknown at ...).
    • Removed the extra leading newline in standalone SLICEBOA{ wrappers so single-line Slice.evalSandbox snippets report line :1: instead of :2:.
    • Updated Tier-0 JSON.parse to return Uncaught SyntaxError on malformed JSON.

Slice (Nexus-JS) v0.10.6

Choose a tag to compare

@siktec-lab siktec-lab released this 09 Nov 23:11
c6b3e77

Slice (Nexus-JS) v0.10.6

Highlights

  • JSON Serialization & Parsing Fast-Path (#37):
    • Added a direct Vec<u8> + ryu_js + shape property-table (Shape::with_property_keys) fast-path for JSON.stringify and a zero-copy Latin1 borrow path for JSON.parse in vendor/boa_engine/src/builtins/json/mod.rs.
    • Added sub-millisecond monotonic performance.now() (__slice_perf_now).
    • Measured speedup: JSON.stringify x 10,000 improved 12.48x (60.0 ms -> 4.81 ms), and JSON.parse(JSON.stringify(obj)) x 10,000 improved 2.92x (94.0 ms -> 32.16 ms).
  • HTTP Dispatch & slice serve Fast-Path (#38):
    • Reused a persistent SliceIsolate per worker thread across TCP connections, cached the resolved entrypoint handler across requests, and added single-pass __slice_http_url(), lazy LiveReqProto getters, and LazyResProto for zero-header-allocation Response.json(data) / new Response("ok").
    • Measured speedup: Single-socket Keep-Alive throughput increased +28.6% (11,917 -> 15,329 req/s) and cold-start improved to 0.96 us min (1.05 us P50).
  • Source Map & Error.stack Resolution (#33):
    • Kept the fused runtime prelude on a single line so SLICEBC\x01 pre-compiled bytecode line numbers align 1:1 with //@sm: source map markers, and extended source map resolution to cover ES6 class methods, dynamic error prefixes, and uncaught exception output.
  • node:fs VFS Additions, node:readline, and Core Compatibility Shims (#28, #31):
    • Added cpSync/cp, readlinkSync/readlink, truncateSync/truncate, utimesSync/utimes, lutimesSync/lutimes, watch/watchFile/unwatchFile (and fs.promises.* equivalents) backed by the in-memory CoW VFS.
    • Added node:readline (createInterface, async iterator), node:readline/promises, and compatibility shims for node:v8, node:inspector, node:cluster, node:http2, and node:wasi.
  • CAS Archive Provenance, Dependency Diagnostics & Engine Docs (#34, #35, #36):
    • Added lockfile_blake3 and resolved package.json dependency versions to CasIndexHeader and slice inspect.
    • Added a missing-node_modules diagnostic hint in the module resolver and documented boa_engine patches in vendor/boa_engine/SLICE_PATCH.md.

Slice (Nexus-JS) v0.10.5

Choose a tag to compare

@siktec-lab siktec-lab released this 09 Nov 08:33
6a2fcf5

Slice (Nexus-JS) v0.10.5

Highlights

  • Sandbox & MCP Security/Capability Enhancements (#12–#16):
    • Custom Slice.evalSandbox Audit Secrets (#12): Added auditSecret / auditSecrets options to Slice.evalSandbox and slice mcp (slice_eval_ts), scanning child stdout and return values for raw, Base64, and Base64URL secret leaks while isolating child secrets from the parent compartment.
    • Guest Checkpoint Controls (#13): Added checkpoints (boolean), maxCheckpoints (usize), and checkpointsTaken / restoresPerformed telemetry to Slice.evalSandbox and slice mcp.
    • MCP Deterministic Seed & Memory Alias (#14, #15): Added deterministicSeed and memoryBytes support to slice_eval_ts in slice mcp.
    • Time-Travel slice test Async & Clock Accuracy (#16): Started per-test wall-clock timers after lazy compilation, preserved async errors across async test(...) promises, and restored BOA_TIME_WARP_ENABLED via an RAII guard.
  • Bug & Isolation Fixes (#1–#11):
    • Partitioned outbound HTTP/1.1 Keep-Alive connection pools by (tenant, host, port) to prevent cross-tenant socket reuse or eviction.
    • Enforced strict OCap and SSRF validation on mocked fetch, WebSocket, and Slice.connect sockets before consulting mock tables.
    • Fixed SavedIsolateContextGuard restoration of parent event-loop state, BOA_ENV_MAP, BOA_HTTP_REQ, BOA_HTTP_RESP, BOA_ACTIVE_TENANT, and mock tables across nested Slice.evalSandbox calls.
  • Engine Performance & Memory Optimizations:
    • Dirty-Subsystem Bitmask (BOA_DIRTY_SUBSYSTEMS) & Zero-Allocation Context Guard: Added a single-byte dirty bitmask (DIRTY_EVENT_LOOP, DIRTY_ALS, DIRTY_FETCH_MOCK, DIRTY_WEBSOCKET, DIRTY_SOCKETS, DIRTY_WORKERS, DIRTY_WASM) and Option<SavedEventLoopSnapshot> fast path so synchronous isolates and nested sandboxes skip cloning or clearing untouched subsystems.
    • SANDBOX_EVAL_BC_CACHE & Tier-0 AST Fast Rejections: Added a 64-entry thread-local Rc<[u8]> bytecode cache in compile_source_for_sandbox_eval, reducing child Slice.evalSandbox latency by 88.4% (15.22 us -> 1.77 us) and 3-branch Tree-of-Thought evaluation by 48.6% (107.06 us -> 55.02 us).
    • Precompiled __slice_drain_wu & Response.json Fast-Path: Cached globalThis.__slice_drain_wu on WarmBoaRealm::drain_wu_fn and added a !init fast-path to Response.json, boosting slice serve Tier-1 WinterTC throughput by +21.2% (120,333 req/s -> 145,839 req/s).
    • CHECKPOINT_SLAB & EDGE_KV_SLAB Cleanup: Purged pre-warm checkpoints in prewarm_boa_bundle and skipped empty KV shard probes in restore_tenant_state, cutting CS-01 Warm latency by -16.4% (15.69 ms -> 13.12 ms), CS-05 Warm latency by -12.9% (11.85 ms -> 10.31 ms), and Slice.kv memory footprint by -31.8% (12,362 B -> 8,431 B).

Slice (Nexus-JS) v0.10.4

Choose a tag to compare

@siktec-lab siktec-lab released this 08 Nov 20:52
abdbf89

Slice (Nexus-JS) v0.10.4

Highlights

  • Workspace-Wide Domain Architecture: Reorganized all five workspace crates (slice-engine, slice-cas, slice-sandbox, slice-io, and slice-cli) into focused domain subdirectories with concise root lib.rs / main.rs entrypoints.
  • Security Hardening:
    • slice-engine: Hardened isolate compartment lifecycle, OCap/DLP enforcement, and cryptographic intrinsics.
    • slice-cas: Prevented JSON module code injection, blocked package.json exports/imports path traversal outside package roots, guarded against circular tsconfig.json extends chains, and added safe bracket export binding for non-identifier export names.
    • slice-sandbox: Hardened VFS lexical normalization against Windows UNC/device-namespace prefixes and null bytes, enforced strict port isolation in verify_net_connect, expanded SSRF guards for trailing-dot FQDNs, IPv6 zone indices, and NAT64/6to4/Teredo transition ranges, and sanitized subprocess binary names.
    • slice-io: Enforced active-allocation bitmap checks on slab reads/writes, zeroed slab buffers on release, and rejected duplicate buffer-slot aliasing in completion ring submissions.
    • slice-cli: Registered explicit audit_secrets across all HTTP server worker isolates, JSON-escaped SandboxViolation 403 responses, switched temporary .cas staging files to unique per-invocation paths, skipped symlinks in --watch and test discovery, and wired allowNet/allowExec with bounded request lines in slice mcp.
  • Performance Optimizations:
    • slice-cas: Single-pass CJS require summary scanning, zero-allocation import specifier scanning, and cached Oxc AST dead-export liveness analysis.
    • slice-sandbox: Zero-allocation VFS path validation, ASCII case-insensitive secret key classification, and FxHashMap/FxHashSet capability lookups.
    • slice-io: LIFO hot-cache slab slot allocation and O(1) active-slot accounting.
    • slice-cli: Single-stat FxHashMap multi-tenant .cas hot-swap caching and stack-allocated itoa HTTP response header formatting.

Slice (Nexus-JS) v0.10.1

Choose a tag to compare

@siktec-lab siktec-lab released this 07 Nov 18:09

Slice (Nexus-JS) v0.10.1

Highlights

  • Modular Host Bindings Architecture (src/bindings/): Split the monolithic host_bindings.rs into 14 focused domain modules (core, helpers, crypto, fs, http_and_fetch, kv_and_sandbox, wintertc_and_buffer, websocket, workers_and_sockets, wasm, child_process, deterministic_and_os, intrinsics).
  • Zero-Copy TypedArray & DataView Fast Paths (boa_engine + helpers.rs): Added direct native downcast methods (TypedArray::with_bytes, TypedArray::with_bytes_mut, TypedArray::fast_byte_length, DataView::with_bytes) eliminating JS property lookups and intermediate Vec<u8> allocations across WebCrypto, node:crypto, TextEncoder/TextDecoder, Buffer, zlib, sockets, and WebAssembly (6.1x faster crypto.getRandomValues, 2.0x faster TextEncoder.encodeInto, 1.9x faster createHash/createHmac).
  • Streaming JSON.parse via DeserializeSeed (serde_json): Eliminated intermediate serde_json::Value DOM trees during JSON.parse, delivering a 27% speedup on JSON transformation pipelines (195.89 us vs 269.67 us).
  • 5-Ring Security & OCap Hardening:
    • Enforced VFS symlink target resolution and OCap read/write verification across all node:fs operations (SEC-01).
    • Enforced isolate memory ceilings (BOA_KV_MEM_BUDGET) on VFS writes, console.log, and crypto.randomBytes (SEC-02).
    • Bounded zlib decompression streams to the active isolate memory ceiling and metered CPU fuel (SEC-03).
    • Extended Egress DLP scanning to HTTP response headers and Content-Type (SEC-04).
    • Verified FsRead OCap on subprocess cwd and sanitized dynamic linker/shell environment variables (LD_PRELOAD, DYLD_*, BASH_ENV) in node:child_process (SEC-05).

Slice (Nexus-JS) v0.9.91

Choose a tag to compare

@siktec-lab siktec-lab released this 06 Nov 19:44

Slice (Nexus-JS) v0.9.91

Highlights

  • Default Optimal Execution Path (Tier 1 + SLICEBC\x01 Precompiled Boa CodeBlock CAS):
    • Serializes compiled Gc bytecode, global Scope bindings, Oxc AST deferred function module spans (