Skip to content

Add browser and JavaScript host interoperability for WebAssembly #373

Closed

Description

@LunaStev

Tracked by #349 and dependent on the target contract in #366.

Scope

  • Define how Wave functions are exported to JavaScript.
  • Define host function imports and module/name mapping.
  • Specify linear-memory ownership and pointer/length string or byte-slice exchange.
  • Define error behavior for missing or incompatible imports.
  • Provide a JavaScript harness that instantiates a Wave module.
  • Add automated scalar, memory, callback, and exported-function fixtures.
  • Run the harness in a pinned Node.js or headless browser environment.
  • Keep browser support distinct from WASI support in Add WASI execution and standard-library platform contracts #367.

Completion criteria

  • JavaScript calls an exported Wave function.
  • Wave calls an imported JavaScript function.
  • A byte buffer round-trips through linear memory.
  • Import/export signature mismatches fail clearly.
  • CI executes the fixture rather than only inspecting the module.

Activity

  1. added
    enhancement
    help wanted
    feature request
    needs testing
    on Aug 25, 2026
  2. Swarnabha753 commented on Aug 27, 2026

    @Swarnabha753

    I'd like to work on this issue. I can take this up and implement the JavaScript/Wasm host interoperability, including the JS harness, memory round-trip, import/export handling, and automated fixtures.

    Could you please assign this issue to me? I'd be happy to get started.

  3. LunaStev commented on Aug 27, 2026

    @LunaStev
    MemberAuthor

    I'd like to work on this issue. I can take this up and implement the JavaScript/Wasm host interoperability, including the JS harness, memory round-trip, import/export handling, and automated fixtures.

    Could you please assign this issue to me? I'd be happy to get started.

    Thanks! I've assigned this issue to you.

  4. Swarnabha753 commented on Aug 28, 2026

    @Swarnabha753

    Hi @LunaStev, thanks for assigning #373 to me. After looking through the existing Rust/LLVM target implementation, I realized this issue is outside my current experience, particularly the Rust, LLVM, and WebAssembly ABI work.

    I don't want to submit a speculative implementation that may not fit the project, so I think it's better for me to step back from this issue and let someone with more relevant compiler/LLVM experience take it forward.

    Sorry for the change of plans, and thank you for understanding.

  5. LunaStev commented on Aug 28, 2026

    @LunaStev
    MemberAuthor

    Hi @LunaStev, thanks for assigning #373 to me. After looking through the existing Rust/LLVM target implementation, I realized this issue is outside my current experience, particularly the Rust, LLVM, and WebAssembly ABI work.

    I don't want to submit a speculative implementation that may not fit the project, so I think it's better for me to step back from this issue and let someone with more relevant compiler/LLVM experience take it forward.

    Sorry for the change of plans, and thank you for understanding.

    That's fine. Thank you for taking the initiative. If you ever get into LLVM and Rust or self-hosting, please learn Wave and contribute, or build lots of things with Wave. Thank you.

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

    enhancementfeature requesthelp wantedneeds testing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions