use crate::types::StringView;
#[repr(C)]
#[derive(Debug, Clone, Copy)]
pub struct BundleInitContext {
pub bundle_id: u64,
pub bundle_path: StringView,
}
#[cfg(test)]
mod tests {
use core::ffi::c_void;
use core::mem::{align_of, offset_of, size_of};
use crate::plugin::plugin_context::BundleInitContext;
#[test]
#[cfg(target_pointer_width = "64")]
fn bundle_init_context_layout() {
assert_eq!(size_of::<BundleInitContext>(), 24);
assert_eq!(align_of::<BundleInitContext>(), 8);
assert_eq!(offset_of!(BundleInitContext, bundle_id), 0);
assert_eq!(offset_of!(BundleInitContext, bundle_path), 8);
}
#[test]
fn bundle_init_context_no_bare_c_void() {
assert_eq!(size_of::<u64>(), 8);
assert_eq!(size_of::<crate::types::StringView>(), 16);
assert_eq!(size_of::<BundleInitContext>(), 24);
let _ = size_of::<c_void>(); }
}