Skip to main content

mabi_cli/
runtime_registry.rs

1use mabi_runtime::{ProtocolCatalogEntry, ProtocolDriverRegistry};
2
3/// Builds the workspace protocol driver registry from crate-owned drivers.
4pub fn workspace_protocol_registry() -> ProtocolDriverRegistry {
5    let mut registry = ProtocolDriverRegistry::new();
6    registry.register(mabi_modbus::driver());
7    registry.register(mabi_opcua::driver());
8    registry.register(mabi_bacnet::driver());
9    registry.register(mabi_knx::driver());
10    registry
11}
12
13/// Returns the stable protocol catalog for CLI inspection surfaces.
14pub fn protocol_catalog() -> Vec<ProtocolCatalogEntry> {
15    workspace_protocol_registry().catalog()
16}