Appearance
Call a plugin from guest code
Plugin imports are ordinary Wasm functions. Use the syntax your guest language already provides for imported functions.
This example calls tutorial.answer() -> i32.
wat
(import "tutorial" "answer" (func $answer (result i32)))
(func (export "run") (result i32)
call $answer)The module name, function name, parameters, and results must match the plugin declaration.
Run examples/22-language-guests to execute all three compiled guests against one host function. Its build script reproduces the checked-in .wasm files.
