use std::ffi::CString;
use std::os::raw::c_char;
mod config;
mod error;
mod token;
pub use config::{HessraConfig, HessraPublicKey};
pub use error::HessraResult;
#[no_mangle]
pub extern "C" fn hessra_version() -> *const c_char {
static VERSION: &str = env!("CARGO_PKG_VERSION");
let c_str = CString::new(VERSION).unwrap_or_default();
c_str.into_raw()
}
#[no_mangle]
pub unsafe extern "C" fn hessra_string_free(string: *mut c_char) {
if !string.is_null() {
let _ = CString::from_raw(string);
}
}
#[no_mangle]
pub extern "C" fn hessra_init() -> HessraResult {
error::HessraResult::SUCCESS
}