Product tip: 0.2.1.
Mako's current FFI is extern "C" plus the runtime C headers. The plugin ABI
gives native dynamic plugins and future WASM plugins one stable handshake.
Header: runtime/mako_plugin.h
mako.plugin.v11mako_plugin_entryconst MakoPluginVTable *mako_plugin_entry(void)free_string when
the plugin provides itThe ABI surface is intentionally small:
MakoPluginInfo: name, version, kind, ABI versionMakoPluginHost: host callbacks, currently logging and opaque user dataMakoPluginVTable: init, shutdown, call, string free callbackGenerate a native starter:
mako deploy plugin my-plugin --name my-plugin --kind native
cd my-plugin
./build-plugin.sh
Generate a WASM plugin manifest/starter:
mako deploy plugin my-wasm-plugin --name my-wasm-plugin --kind wasm
The WASM starter exports ABI-version and call functions. Its generated example
implements a deterministic ping operation (ping with an empty payload
returns 1; unsupported operations return 0). Full WASM
component-model adapters, WIT generation, capability negotiation, and host-side
dynamic loading remain roadmap work.
Done now:
Not done yet:
dlopen / LoadLibrary host loaderplugin import syntax