Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

858 B
Raw Blame

Working with externref

You can also browse this source code online and clone the wasmtime repository to run the example locally:

This example shows how to pass opaque host references into and out of WebAssembly using externref.

Wasm Source

{{#include ../examples/externref.wat}}

Host Source

{{#include ../examples/externref.rs}}
{{#include ../examples/externref.c}}
{{#include ../examples/externref.cc}}