1#![no_std]
7
8#[allow(
9 non_camel_case_types,
10 non_snake_case,
11 non_upper_case_globals,
12 clippy::all,
13 clippy::pedantic,
14 clippy::nursery,
15 rustdoc::all
16)]
17#[rustfmt::skip]
18mod bindings;
19
20pub use bindings::*;
21
22pub type AnvilPluginLoadFn =
25 unsafe extern "C" fn(host: *const AnvilHost, self_: *mut AnvilPlugin) -> AnvilResult;
26
27const _: () = {
30 use core::mem::{align_of, offset_of, size_of};
31 assert!(size_of::<AnvilCpuContext>() == 408);
32 assert!(align_of::<AnvilCpuContext>() == 8);
33 assert!(size_of::<AnvilXmm>() == 16);
34 assert!(offset_of!(AnvilCpuContext, xmm) == 0);
35 assert!(offset_of!(AnvilCpuContext, rflags) == 256);
36 assert!(offset_of!(AnvilCpuContext, rax) == 256 + 14 * 8);
37 assert!(offset_of!(AnvilCpuContext, rsp) == 256 + 16 * 8);
38 assert!(offset_of!(AnvilCpuContext, rip) == 256 + 18 * 8);
39 assert!(ANVIL_API_VERSION == 2);
40 assert!(size_of::<usize>() == 8);
42};