镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Wasm: add compileStreaming and instantiateStreaming #408

Closed

Description

@chrisbbreuer

Parent: #406
Related: #141, #142, #143, #407, #409
Roadmap: #134

Implement the standard JavaScript streaming compilation APIs over genuine Fetch Body streams and the existing WebAssembly parser, validator, compiler, and feature profiles.

Scope

  • Implement realm-local WebAssembly.compileStreaming and WebAssembly.instantiateStreaming with standard lengths and property attributes.
  • Assimilate Response Promises and thenables exactly, including abrupt getters/calls and rejection identity.
  • Validate Response brand, success status, exact application/wasm MIME type, bodyUsed, and locked body before compilation.
  • Preserve compile/link/runtime error classes, imports, result shapes, sibling realms, and cancellation.
  • Consume ordered chunks through Fetch Body, take a stable owned snapshot, and enter the existing compiler once; the unobservable incremental private feed is tracked by ABI: implement lifetime-safe Wasm StreamingCompiler feed #409.
  • Prove ordinary-vs-streaming equivalence by dispatching the exact ordinary compile/instantiate jobs and pinning all ten declared feature profiles in the audited contract.
  • Close only after exact fixing-main CI is green.

Activity

  1. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Implemented and pushed directly to main in ea64275b and e457d0b9.

    Evidence now covers split asynchronous chunks, Response/thenable assimilation, imports and result shapes, exact CompileError/LinkError/TypeError behavior, MIME parameters, status, locked/disturbed bodies, abrupt pull and rejection identity, same-VM sibling realms, and intrinsic Promise ordering. The implementation takes the specification-required stable body snapshot and queues the exact ordinary compiler/instantiator jobs; true incremental private feeding remains #409.

    Focused local gates are green in Debug, ReleaseSafe, and TSan: 3/3 passed, 0 skipped, 0 failed, 0 leaked in every mode. Home and Bun private-ABI audits plus their validator unit tests are green. Awaiting the exact e457d0b9 main private-abi-boundary job before closure.

  2. chrisbbreuer commented on Jul 20, 2026

    @chrisbbreuer
    MemberAuthor

    Exact fixing-main CI is green, including the complete private-ABI boundary: https://github.com/zig-utils/zig-js/actions/runs/29785272707/job/88495394827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions