1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub mod plugin_registry;
pub use plugin_registry::{InvocationError, PluginDeclaration, PluginRegistrar, Function};
pub use plugin_registry::plugin::{RUSTC_VERSION, CORE_VERSION};

#[macro_export]
macro_rules! export_plugin {
    ($register:expr) => {
        #[doc(hidden)]
        #[no_mangle]
        pub static plugin_declaration: $crate::PluginDeclaration =
            $crate::PluginDeclaration {
                rustc_version: $crate::RUSTC_VERSION,
                core_version: $crate::CORE_VERSION,
                register: $register,
            };
    };
}