Skip to content

Support for WebAssembly externref in non-web environment #103516

Open
@kwerner8

Description

@kwerner8

My goal is to compile a function written in Rust to WebAssembly which has as an input/output type externref.
Then I want to call this function as an export in Wasmtime. So, this function will receive an externref as an input and also return one.

The WebAssembly Code in the wat format should look similar to this:

(func (export "func") (param externref) (result externref)
... WebAssembly Code ... )

I have seen that there exists wasm-bindgen for browser hosts.

Is there a way to produce externref as an input and output for exports of functions written in Rust that can be called in non-web environments like Wasmtime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions