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

Function callback

example/threads.c:16–20  ·  view source on GitHub ↗

A function to be called from Wasm code.

Source from the content-addressed store, hash-verified

14
15// A function to be called from Wasm code.
16own wasm_trap_t* callback(const wasm_val_vec_t* args, wasm_val_vec_t* results) {
17 assert(args->data[0].kind == WASM_I32);
18 printf("> Thread %d running\n", args->data[0].of.i32);
19 return NULL;
20}
21
22
23typedef struct {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected