Skip to main content

package

Macro package 

Source
macro_rules! package {
    () => { ... };
}
Expand description

Unified plugin shell macro for I-0102.

Single-line invocation at the crate root of any packaged Rust cdylib:

cloacina::package!();

Emits, gated on #[cfg(feature = "packaged")]:

  1. A pub mod _ffi containing a CloacinaPackagePlugin unit struct.
  2. A #[plugin_impl] block exporting the version-2 CloacinaPlugin trait. Six methods: get_task_metadata, execute_task, get_graph_metadata, execute_graph, get_reactor_metadata, get_trigger_metadata. The reactor body walks inventory::iter::<ReactorEntry> and projects each entry to a ReactorPackageMetadata value. The other bodies are stubs at this iteration of T-A — they ship empty/NotImplemented and will be fleshed out as the remaining inventory entry types relocate to leaf crates reachable from packaged cdylibs.
  3. A mod __cloacina_package_marker { pub struct Once; } guard. A second invocation in the same crate fails to compile (duplicate module name).
  4. A fidius_plugin_registry!() invocation to export the plugin.

Coexistence: in T-A the per-macro _ffi emission from #[computation_graph] and #[workflow] is unchanged. A crate that adds cloacina::package!(); AND has #[computation_graph] / #[workflow] would emit two fidius_plugin_registry!() calls → linker conflict. T-C strips the per-macro emission so the shell becomes the only path.