A Go SDK for integrating the Extism runtime to run WebAssembly modules as plugins within Go applications.
Extism Go SDK is a library that allows Go applications to run WebAssembly modules as plugins. It provides tools to load Wasm code, call its exported functions, and extend its capabilities through host functions written in Go. It solves the problem of securely and efficiently executing code from multiple languages within a Go host.
Go developers who need to extend their applications with pluggable, sandboxed functionality, or who want to integrate WebAssembly modules for tasks like user-defined logic, plugins, or cross-language components.
Developers choose it for its clean Go API, deep integration with the Extism runtime, support for performance features like pre-compilation, and the ability to safely extend plugin behavior with custom host functions.
Extism Go SDK - easily run WebAssembly modules in your Go applications
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The SDK's Manifest allows loading Wasm modules from diverse sources like URLs, files, and with configurable options, as shown in examples using WasmUrl and WasmFile for easy plugin deployment.
Enables exposing custom Go functions to plugins for deep host integration, exemplified by the kv_read and kv_write functions that provide a mock KV store, bridging plugin and host capabilities.
Supports pre-compilation with CompiledPlugin and caching via Wazero's compilation cache, reducing initialization times for repeated instances, as detailed in the performance sections of the README.
Seamlessly integrates with the Dylibso Observe SDK for tracing and monitoring plugin execution, demonstrated through config settings like ObserveAdapter for telemetry data emission.
Implementing host functions requires manual memory management using methods like ReadString and WriteBytes on CurrentPlugin, which can be error-prone and adds development overhead, as seen in the kv_store example.
The SDK is built on the Wazero WebAssembly runtime, tying it to Wazero's performance quirks and potential breaking changes, evident in the configuration options and compilation cache setup.
Compared to established plugin systems, Extism's plugin ecosystem is smaller, limiting off-the-shelf options, as documentation relies on demo plugins like count_vowels rather than a broad library.