graft
graft
Shared-library ABI 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 or host surface. |
Enumerations
| Name | Description |
|---|---|
RuntimeKind | Runtime contract declared by a graft manifest. |
RuntimeKind
enum RuntimeKindRuntime contract declared by a graft 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. |
Host | Manifest describes a host-exported C ABI surface, not a plugin. |
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. |
Graft_API void | validatePluginManifest | Throws when a manifest is not a plugin-loadable manifest. |
Graft_API void | validateHostSurfaceManifest | Throws when a manifest is not a host-exported surface manifest. |
Manifest | manifestFromC inline noexcept | |
void | validateManifest inline | |
void | validatePluginManifest inline | |
void | validateHostSurfaceManifest inline |
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.
validatePluginManifest
Graft_API void validatePluginManifest(const Manifest & manifest, std::string_view path)Throws when a manifest is not a plugin-loadable manifest.
validateHostSurfaceManifest
Graft_API void validateHostSurfaceManifest(const Manifest & manifest, std::string_view path)Throws when a manifest is not a host-exported surface manifest.
manifestFromC
inline noexcept
inline Manifest manifestFromC(const ::icy_graft_manifest_t & manifest) noexceptvalidateManifest
inline
inline void validateManifest(const ::icy_graft_manifest_t & manifest, std::string_view path)validatePluginManifest
inline
inline void validatePluginManifest(const ::icy_graft_manifest_t & manifest, std::string_view path)validateHostSurfaceManifest
inline
inline void validateHostSurfaceManifest(const ::icy_graft_manifest_t & manifest, std::string_view path)Variables
| Return | Name | Description |
|---|---|---|
constexpr std::uint32_t | ABI_VERSION constexpr | Current binary manifest ABI version required by the loader. |
constexpr const char * | PLUGIN_MANIFEST_SYMBOL constexpr | Exported symbol name that plugin libraries use for their manifest. |
constexpr const char * | MANIFEST_SYMBOL constexpr | Backwards-compatible name for PLUGIN_MANIFEST_SYMBOL. |
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. |
constexpr const char * | RUNTIME_HOST constexpr | Runtime string for host-exported C ABI surfaces. |
ABI_VERSION
constexpr
constexpr std::uint32_t ABI_VERSION = Current binary manifest ABI version required by the loader.
PLUGIN_MANIFEST_SYMBOL
constexpr
constexpr const char * PLUGIN_MANIFEST_SYMBOL = Exported symbol name that plugin libraries use for their manifest.
MANIFEST_SYMBOL
constexpr
constexpr const char * MANIFEST_SYMBOL = Backwards-compatible name for PLUGIN_MANIFEST_SYMBOL.
RUNTIME_NATIVE
constexpr
constexpr const char * RUNTIME_NATIVE = Runtime string for plugins loaded directly into the current process.
RUNTIME_WORKER
constexpr
constexpr const char * RUNTIME_WORKER = Runtime string for plugins intended to execute in a worker runtime.
RUNTIME_HOST
constexpr
constexpr const char * RUNTIME_HOST = Runtime string for host-exported C ABI surfaces.
