> This page is for NeMo Relay, version dev.
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.1) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.11.1: https://docs.nvidia.com/nemo/relay/v0.11.1/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/relay/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/relay/_mcp/server.

# nemo-relay-plugin-host

> Generic plugin infrastructure for NeMo Relay runtimes.

Generated from `cargo doc --no-deps -p nemo-relay-builtins -p nemo-relay-diagnostics -p nemo-relay-logging -p nemo-relay-plugin-host -p nemo-relay-codecs -p nemo-relay -p nemo-relay-runtime -p nemo-relay-model-pricing -p nemo-relay-resource-metrics -p nemo-relay-observability -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

Generic plugin infrastructure for NeMo Relay runtimes.

This module owns:

* config diagnostics and policy enums used by plugin systems
* a global plugin registry
* plugin registration contexts for middleware/subscriber installation
* rollback bookkeeping for registrations created during plugin setup

## Re-exports

* `pub use dynamic::*;`

## Modules

* [composition](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/composition): Built-in plugin composition supplied by the host or embedding application.
* [dynamic](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/dynamic): Dynamic plugin control-plane and registry model.
* [exporter](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/exporter): Exporter constructors bound to the shared execution runtime. Exporter constructors bound to the execution runtime's scopes, codecs, and diagnostics.
* [resource_metrics](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/resource_metrics): Resource collection and supervised-process integration. Fresh and managed system resource metric observation.

## Structs

* [ConfigDiagnostic](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-configdiagnostic): Structured diagnostic reported while validating or activating plugin configuration.
* [ConfigPolicy](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-configpolicy): Policy for how unsupported plugin/runtime config is handled.
* [ConfigReport](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-configreport): Structured configuration and activation report.
* [HostPluginRegistrationContext](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-hostpluginregistrationcontext): Host implementation of the shared [`PluginRegistrationContext`](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/trait-pluginregistrationcontext) interface.
* [PluginComponentSpec](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-plugincomponentspec): One configured plugin component.
* [PluginConfig](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-pluginconfig): Canonical plugin configuration document.
* [PluginRegistration](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-pluginregistration): Bookkeeping for one middleware/subscriber registration.
* [PluginRollbackOutcome](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-pluginrollbackoutcome): Result of rolling back a set of plugin registrations.
* [RuntimeDiagnostic](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/struct-runtimediagnostic): Bounded aggregate for a runtime failure observed by an active plugin.

## Enums

* [DiagnosticLevel](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/enum-diagnosticlevel): Severity of a plugin configuration or activation diagnostic.
* [PluginError](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/enum-pluginerror): Error type for generic plugin operations.
* [PluginRegistrationCleanupOutcome](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/enum-pluginregistrationcleanupoutcome): Outcome of a tracked resource cleanup operation.
* [UnsupportedBehavior](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/enum-unsupportedbehavior): Per-policy behavior for unsupported configuration.

## Traits

* [Plugin](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/trait-plugin): Implemented by custom plugins that register runtime middleware.
* [PluginRegistrationContext](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/trait-pluginregistrationcontext): Host capabilities available to plugins during component activation.

## Functions

* [apply_global_config_policy](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-apply-global-config-policy): Applies non-default global policy fields to a component policy.
* [deregister_plugin](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-deregister-plugin): Removes a previously registered plugin.
* [ensure_builtin_plugins_registered](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-ensure-builtin-plugins-registered): Register built-in plugin kinds supplied by the embedding host.
* [initialize_exact](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-initialize-exact): Activate exactly the supplied configuration without implicit discovery.
* [initialize_runtime](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-initialize-runtime): Install shared default services without activating configured plugins. Explicit services installed by an embedding application remain selected.
* [initialize_with_verified_specs](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-initialize-with-verified-specs): Activate verified artifacts under the host's configuration lease.
* [list_plugin_kinds](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-list-plugin-kinds): Lists registered plugin kinds in sorted order.
* [lookup_plugin](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-lookup-plugin): Looks up a registered plugin by kind.
* [plugin_config_schema](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-plugin-config-schema): Returns the JSON Schema for the canonical plugin configuration document.
* [record_active_plugin_runtime_diagnostic](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-record-active-plugin-runtime-diagnostic): Updates the existing active-only runtime report.
* [register_plugin](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-register-plugin): Registers a plugin by kind.
* [rollback_registrations](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/fn-rollback-registrations): Rolls back registrations in reverse order.

## Type Aliases

* [Result](/nemo/relay/dev/reference/api/rust-library-reference/nemo-relay-plugin-host/type-result): Specialized [`Result`](https://doc.rust-lang.org/1.96.1/core/result/enum.Result.html) type for plugin operations.