pub mod contract_type;
pub mod dispatch;
pub mod ffi;
pub mod guest;
pub mod host;
pub mod plugin;
pub mod runtime;
mod supported_language;
#[cfg(feature = "tracking")]
pub mod tracking;
pub mod types;
pub use supported_language::SupportedLanguage;
pub use runtime::{Compatibility, ReloadPhase, ReloadPhaseType, RuntimeConfig};
pub use types::{
AbiError, AbiErrorCode, ArenaOverflowBlock, Array, Buffer, CallArena, DependencyInfo, LogLevel,
StringView, Version,
};
pub use dispatch::{DispatchMechanisms, DispatchType, NativeDispatch, VmDispatch, VmLoaderData};
pub use types::{abi_error_ok, string_view_from_static, string_view_null};
pub use guest::{GuestContractInstance, GuestContractInterface};
pub use host::{HostApi, HostContractInstance, HostContractInterface};
pub use plugin::{BundleInitContext, GuestContractHandle, PluginDescriptor};
pub const POLYPLUG_ABI_VERSION: u32 = 1;
#[cfg(test)]
mod tests {
use crate::types::{AbiError, AbiErrorCode};
#[test]
fn test_abi_error_ok() {
let e: AbiError = AbiError::ok();
assert!(e.is_ok());
assert_eq!(e.code, AbiErrorCode::Ok as u32);
}
}