1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Link-time registry of interfaces declared in a plugin crate.
//!
//! Each `#[plugin_interface(name = "...", version = N)]` attribute
//! submits a [`RegisteredInterface`] entry to this registry via
//! `inventory`. The `#[export]` macro iterates the registry at runtime
//! (inside `cfmp_query_interfaces`) to build the packed
//! `name\0version\0` payload the loader parses — so plugin authors no
//! longer need to repeat the interface list in the `#[export]`
//! attribute.
//!
//! This is the plugin-side mirror of `confium_core::ffi::registry`: the
//! core registry maps interface names to builder functions; this
//! registry maps interface names to the versions a single plugin
//! advertises.
/// One `(name, version)` pair that a plugin's `#[plugin_interface]`
/// attribute declared. Collected at link time via `inventory`.
collect!;
/// Re-export of `inventory::submit!` under a `confium_api`-owned path so
/// the `#[plugin_interface]` proc-macro can emit registrations through
/// `$crate` without forcing every plugin crate to list `inventory` as a
/// direct dependency. The `submit!` macro's internal `$crate`
/// references still resolve to the `inventory` crate (macros are
/// hygienic), so this re-export is sound.
pub use submit as inventory_submit;
/// Submit a [`RegisteredInterface`] to the link-time registry. Thin
/// wrapper around `inventory::submit!` so the `#[plugin_interface]`
/// proc-macro can emit registrations through `confium_api` without
/// forcing every plugin crate to depend on `inventory` directly.
/// Iterator over every interface registered in the linked plugin crate.
/// Used by the `#[export]` macro to populate `cfmp_query_interfaces`
/// without requiring the plugin author to redeclare the list.