Expand description
f00 plugin host ABI.
§ABI contract (v1)
Dynamic plugins are shared libraries (.so / .dylib / .dll) that export:
| Symbol | Signature | Purpose |
|---|---|---|
f00_plugin_abi_version | extern "C" fn() -> u32 | Must return ABI_VERSION |
f00_plugin_name | extern "C" fn() -> *const c_char | NUL-terminated UTF-8 name |
f00_plugin_on_entries_json | optional extern "C" fn(*const u8, usize, *mut u8, *mut usize) -> i32 | Transform JSON entry array |
Host discovery paths (first match wins per file):
$F00_PLUGIN_DIR(colon/semicolon separated)~/.f00/plugins~/.config/f00/plugins(Unix) /%APPDATA%\f00\plugins(Windows)
Enable with Cargo feature plugins on f00-cli.
Structs§
- Plugin
- A loaded plugin library.
Enums§
Constants§
- ABI_
VERSION - Current host/plugin ABI version. Bump only on incompatible C ABI changes.
Functions§
- discover_
plugin_ paths - List plugin library basenames (for
f00 --list-plugins). - load_
all_ plugins - Load all plugins found under search dirs. Failures for individual files are skipped
when
strictis false; returned as errors whenstrictis true. - load_
plugin - Load a single plugin library from
path. - plugin_
search_ dirs - Directories searched for plugins (may not exist).
Type Aliases§
- AbiVersion
Fn - Required export: returns
ABI_VERSION. - NameFn
- Required export: static C string name.
- OnEntries
Json Fn - Optional export: rewrite a JSON array of entries.