-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-langRelevant to the language teamRelevant to the language team
Description
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?
bb010g
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/T-langRelevant to the language teamRelevant to the language team