Skip to content

Can the host (Go via wasmtime) call a named function inside a Javy-compiled WASM module? #1024

@Calrain

Description

@Calrain

Hi team,

We’re embedding a Javy-compiled WASM module in Go using wasmtime-go.
We already have a Javy plugin that exposes host functions back to JavaScript and that works well.

What we’d like to do next is have the Go host call a specific JavaScript function (exported from the Javy module) directly — essentially instance.GetFunc("my_js_func").Call(...).

Is this supported with Javy’s runtime model, or does Javy wrap QuickJS in a way that prevents direct host-to-guest function calls?
If it’s possible, could you point to an example or best practice for doing this safely?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions