#![deny(missing_docs)]
#![warn(clippy::pedantic)]
#![doc = include_str!("../README.md")]
pub use dynamic_plugin_macros::*;
pub use const_format::concatcp as const_concat;
pub use libloading::Library as PluginDynamicLibrary;
pub use libloading::Symbol as PluginLibrarySymbol;
pub use libc;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("An error while calling the plugin library: {0}")]
DynamicLibrary(#[from] libloading::Error),
#[error("The discovered library is not a plugin.")]
NotAPlugin,
#[error("The plugin's signature does not match.")]
InvalidPluginSignature,
}
#[macro_export]
macro_rules! static_assert {
($exp:expr, $msg:expr) => {
#[deny(const_err)]
#[allow(unused_must_use)]
const _: () = {
if !($exp) {
core::panic!("{}", $msg);
}
()
};
};
}