MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / hello_callback

Function hello_callback

example/serialize.cc:11–17  ·  view source on GitHub ↗

A function to be called from Wasm code.

Source from the content-addressed store, hash-verified

9
10// A function to be called from Wasm code.
11auto hello_callback(
12 const wasm::vec<wasm::Val>& args, wasm::vec<wasm::Val>& results
13) -> wasm::own<wasm::Trap> {
14 std::cout << "Calling back..." << std::endl;
15 std::cout << "> Hello world!" << std::endl;
16 return nullptr;
17}
18
19
20void run() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected