Expand description
Native plugins: implementations compiled into the tocat binary, as opposed to WASM modules loaded at runtime.
Both kinds implement tocat_api::Plugin and are looked up through the
same Registry, so the relay cannot tell them apart.
Every plugin is a module here, behind a cargo feature, and a feature enables
both the module and whatever optional dependencies it needs: a build without
compress never compiles zstd, and one without wasm never compiles
wasmtime. A crate boundary would buy nothing that does not already buy.
register_native is the only thing this crate exports. No module can
reach another and the binary cannot reach any of them, which is what lets a
plugin change shape without anything above noticing.
Functionsยง
- native_
registry - A registry containing every plugin compiled into this binary.
- register_
native - Add the compiled-in plugins to an existing registry.