Skip to content

ZIPP v0.0.39

Choose a tag to compare

@github-actions github-actions released this 23 Nov 09:42
· 151 commits to main since this release

ZIPP 0.0.39

A bugfix and performance release fixing Python raw stdout/stderr streaming and 64 KiB truncation in both the native CLI (#108) and the embedded WASM API (#109), eliminating quadratic string slicing/searching hotspots in the Python runtime (html.parser, html2text, markdownify), completing textwrap keyword support, and delivering further steady-state DOM and regex throughput gains in the JavaScript engine.

Thank you to @codeandsolder for reporting issues #108 and #109 and sharing detailed v0.0.38 verification results and cross-CPU benchmarks on #99, #100, and #101 — your follow-up reports pinpointed both the CLI and embedded WASM stdout truncation bugs as well as the next wave of Python and JS optimization opportunities.

New in 0.0.39

  • Python stdout/stderr past 64 KiB in both the native CLI (#108) and embedded WASM (#109):
    • Adds a dedicated raw streaming output sink (ScriptState::set_raw_output_sink) and native __zipp_py_write bridge so zipp py (file, directory, and stdin -) preserves exact UTF-8 and binary bytes with no spurious trailing newline (print("hello", end=""), sys.stdout.write("hello")) and streams arbitrarily long output past 64 KiB without inspect_line's "..." truncation.
    • Routes non-streaming / embedded WASM Python hosts (Engine.initPythonProject + Engine.takeConsole) through __zipp_py_write op 1, bypassing inspect_line's 64 KiB truncation so large stdout/stderr payloads (e.g. 70,000+ characters) cross takeConsole() intact up to the 8 MiB MAX_LIFETIME_OUTPUT_BYTES sandbox budget, and fail explicitly with RangeError: script exceeded its output budget if exceeded rather than silently dropping bytes.
    • Adds sys.stdout.buffer / sys.stderr.buffer (write, flush), writelines, flush=True, sys.stdout = None, and sys.stdout redirection support.
  • Python HTML parsing, string, re, truthiness, and textwrap throughput (#100 follow-up):
    • Eliminates O(N²) codepoints(s) splitting in Python string slicing (s[i:j]), bounded str.find/rfind/index/rindex/count, and bounded str.startswith/endswith, sharing an O(log K) surrogate-pair cache across str and re so both ASCII and astral-containing strings scale linearly.
    • Adds native ASCII step-1 slicing in PyStrItem, native bounded PY_STRM fast paths for find/rfind/count/startswith/endswith, per-class R.truth caching, broader PyMethod gb caching for dict-less builtin classes, and dict-less re.Pattern/re.Match objects with direct c1–c4 fast paths.
    • Cuts a 75 KiB html.parser parse from 10.1 s to 66.9 ms (~151× faster), cuts PyMethod misses in markdownify + BeautifulSoup4 by 81.5%, and fixes textwrap.wrap/fill/TextWrapper keyword options (break_long_words, subsequent_indent, etc.) so unmodified html2text works out of the box with its default body_width=78 and matches CPython byte-for-byte even past 64 KiB.
  • JavaScript %RegExp.prototype% fast-slot cache and planned object pooling (#101 follow-up):
    • Registers @@split (REGEXP_SYM_SPLIT) in REGEXP_PROTOCOL_PROTO_SLOTS, fixing a missed cache fill that previously prevented %RegExp.prototype% fast-slot caching from activating on regex replace/split/match/flags calls.
    • Adds pooled, slab-backed Heap::alloc_planned_object for NewPlannedObject (JIT and interpreter) and empty-map guards in jit_make_closure, reducing steady-state profiler samples by ~12.4% on Defuddle and ~9.0% on WebforAI (with 55–72% less GC courier traffic) while keeping outputs byte-identical to Node.

Downloads

File What it is
zipp-0.0.39-windows-x86_64-portable.exe The Windows command line; run it from anywhere.
zipp-0.0.39-windows-x86_64-installer.msi The same binary, installed for the current user into %LOCALAPPDATA%\Programs\ZIPP and added to PATH; no administrator rights. Uninstall from Settings > Apps.
zipp-0.0.39-linux-x86_64 The Linux command line, x86-64 (glibc 2.35 or later). chmod +x it after downloading.
zipp-0.0.39-linux-arm64 The same for 64-bit Arm.
zipp-0.0.39-linux-armv7 The same for 32-bit Arm (hard float); interpreter only, and WebAssembly on wasmi.
zipp-0.0.39-javascript.wasm The JavaScript engine for browsers, Node, Deno and Bun.
zipp-0.0.39-javascript-typescript.wasm The same with TypeScript and TSX.
zipp-0.0.39-javascript-lite.wasm The JavaScript core without Intl and Temporal, built for size.
zipp-0.0.39-javascript-python.wasm JavaScript and Python, torch built in.
zipp-0.0.39-javascript-python-base.wasm JavaScript and Python without torch.
zipp-0.0.39-javascript-php.wasm JavaScript and PHP 8.x, with PhpApp SAPI and SQL bridge support.
zipp-0.0.39-javascript-rust.wasm JavaScript and Rust, with Axum/SQLx worker-boot support.
zipp-0.0.39-torch-package.wasm The torch package for the -python-base engine.
zipp-0.0.39-<engine>.wasm.br Each WebAssembly module compressed with Brotli (quality 11), about a quarter of its size. Serve it with Content-Encoding: br and Content-Type: application/wasm, or let zipp.mjs load it; the plain .wasm is the default.
zipp-0.0.39-wasm-embed-kit.zip zipp.mjs (the loader and sandbox, version 1.5.0) and its types, the host SDK (1.4.0), the engine's TypeScript declarations, the browser GPU adapter, docs and examples.
SHA256SUMS Checksums of every file.

Verification

  • All release binaries, WebAssembly variants, and the embed kit are built and verified from the tagged commit in release.yml and release-build.yml.
  • Every WebAssembly engine module retains the audited 51-function host import surface (plus zippTorchKernel on Python builds) and the 1 GiB linear memory cap.

Full Changelog: v0.0.38...v0.0.39