Graft module
graft
Shared-library plugin contracts and runtime loading helpers.
graft
Shared-library plugin contracts and runtime loading helpers.
Classes
| Name | Description |
|---|---|
Library | Loads a native plugin library and resolves its typed entrypoint. |
Manifest | Metadata exported by a plugin under icy_graft_manifest. |
Enumerations
| Name | Description |
|---|---|
RuntimeKind | Runtime contract declared by a plugin manifest. |
RuntimeKind
enum RuntimeKindRuntime contract declared by a plugin manifest.
| Value | Description |
|---|---|
Unknown | Runtime string is missing or not recognized. |
Native | Plugin is loaded directly into the host process. |
Worker | Plugin is intended for a worker runtime. |
Functions
| Return | Name | Description |
|---|---|---|
Graft_APIRuntimeKind | parseRuntimeKind noexcept | Converts a manifest runtime string to a RuntimeKind. |
Graft_API const char * | runtimeKindName noexcept | Returns the manifest runtime string for a RuntimeKind. |
Graft_API void | validateManifest | Throws when a manifest is incompatible or missing required fields. |
parseRuntimeKind
noexcept
Graft_APIRuntimeKind parseRuntimeKind(std::string_view runtime) noexceptConverts a manifest runtime string to a RuntimeKind.
runtimeKindName
noexcept
Graft_API const char * runtimeKindName(RuntimeKind runtime) noexceptReturns the manifest runtime string for a RuntimeKind.
validateManifest
Graft_API void validateManifest(const Manifest & manifest, std::string_view path)Throws when a manifest is incompatible or missing required fields.
Variables
| Return | Name | Description |
|---|---|---|
constexpr std::uint32_t | ABI_VERSION constexpr | Current binary manifest ABI version required by the loader. |
constexpr const char * | MANIFEST_SYMBOL constexpr | Exported symbol name that plugins use for their manifest. |
constexpr const char * | RUNTIME_NATIVE constexpr | Runtime string for plugins loaded directly into the current process. |
constexpr const char * | RUNTIME_WORKER constexpr | Runtime string for plugins intended to execute in a worker runtime. |
ABI_VERSION
constexpr
constexpr std::uint32_t ABI_VERSION = 1Current binary manifest ABI version required by the loader.
MANIFEST_SYMBOL
constexpr
constexpr const char * MANIFEST_SYMBOL = "icy_graft_manifest"Exported symbol name that plugins use for their manifest.
RUNTIME_NATIVE
constexpr
constexpr const char * RUNTIME_NATIVE = "native"Runtime string for plugins loaded directly into the current process.
RUNTIME_WORKER
constexpr
constexpr const char * RUNTIME_WORKER = "worker"Runtime string for plugins intended to execute in a worker runtime.
