pub const BARYL_ABI_VERSION: u32 = 8;
pub const BARYL_MIN_ABI_VERSION: u32 = 8;
pub const BARYL_ERROR_LEN: u32 = 512;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Control {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MachineConfig {
_unused: [u8; 0],
}
pub const BarylExitKind_BARYL_EXIT_ENGINE: BarylExitKind = 0;
pub const BarylExitKind_BARYL_EXIT_COMPONENT: BarylExitKind = 1;
pub type BarylExitKind = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BarylOutcome {
pub kind: u32,
pub code: i32,
pub message: *const ::std::os::raw::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BarylOutcome"][::std::mem::size_of::<BarylOutcome>() - 16usize];
["Alignment of BarylOutcome"][::std::mem::align_of::<BarylOutcome>() - 8usize];
["Offset of field: BarylOutcome::kind"][::std::mem::offset_of!(BarylOutcome, kind) - 0usize];
["Offset of field: BarylOutcome::code"][::std::mem::offset_of!(BarylOutcome, code) - 4usize];
["Offset of field: BarylOutcome::message"]
[::std::mem::offset_of!(BarylOutcome, message) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BarylRef {
pub ctx: *mut ::std::os::raw::c_void,
pub descriptor: *const BarylDescriptor,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BarylRef"][::std::mem::size_of::<BarylRef>() - 16usize];
["Alignment of BarylRef"][::std::mem::align_of::<BarylRef>() - 8usize];
["Offset of field: BarylRef::ctx"][::std::mem::offset_of!(BarylRef, ctx) - 0usize];
["Offset of field: BarylRef::descriptor"]
[::std::mem::offset_of!(BarylRef, descriptor) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BarylComponent {
pub path: *const ::std::os::raw::c_char,
pub argv: *const *const ::std::os::raw::c_char,
pub argc: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BarylComponent"][::std::mem::size_of::<BarylComponent>() - 24usize];
["Alignment of BarylComponent"][::std::mem::align_of::<BarylComponent>() - 8usize];
["Offset of field: BarylComponent::path"]
[::std::mem::offset_of!(BarylComponent, path) - 0usize];
["Offset of field: BarylComponent::argv"]
[::std::mem::offset_of!(BarylComponent, argv) - 8usize];
["Offset of field: BarylComponent::argc"]
[::std::mem::offset_of!(BarylComponent, argc) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BarylOptions {
pub machine: *const MachineConfig,
pub components: *const BarylComponent,
pub ncomponents: u32,
pub state_dir: *const ::std::os::raw::c_char,
pub log_level: ::std::os::raw::c_int,
pub seed: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BarylOptions"][::std::mem::size_of::<BarylOptions>() - 48usize];
["Alignment of BarylOptions"][::std::mem::align_of::<BarylOptions>() - 8usize];
["Offset of field: BarylOptions::machine"]
[::std::mem::offset_of!(BarylOptions, machine) - 0usize];
["Offset of field: BarylOptions::components"]
[::std::mem::offset_of!(BarylOptions, components) - 8usize];
["Offset of field: BarylOptions::ncomponents"]
[::std::mem::offset_of!(BarylOptions, ncomponents) - 16usize];
["Offset of field: BarylOptions::state_dir"]
[::std::mem::offset_of!(BarylOptions, state_dir) - 24usize];
["Offset of field: BarylOptions::log_level"]
[::std::mem::offset_of!(BarylOptions, log_level) - 32usize];
["Offset of field: BarylOptions::seed"][::std::mem::offset_of!(BarylOptions, seed) - 40usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct BarylDescriptor {
pub version: u32,
pub min_version: u32,
pub name: *const ::std::os::raw::c_char,
pub open: ::std::option::Option<
unsafe extern "C" fn(
image: *const ::std::os::raw::c_char,
options: *const BarylOptions,
err: *mut ::std::os::raw::c_char,
err_len: usize,
) -> *mut ::std::os::raw::c_void,
>,
pub run: ::std::option::Option<
unsafe extern "C" fn(baryl: BarylRef, outcome: *mut BarylOutcome) -> ::std::os::raw::c_int,
>,
pub control: ::std::option::Option<unsafe extern "C" fn(baryl: BarylRef) -> *const Control>,
pub close: ::std::option::Option<unsafe extern "C" fn(baryl: BarylRef)>,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of BarylDescriptor"][::std::mem::size_of::<BarylDescriptor>() - 48usize];
["Alignment of BarylDescriptor"][::std::mem::align_of::<BarylDescriptor>() - 8usize];
["Offset of field: BarylDescriptor::version"]
[::std::mem::offset_of!(BarylDescriptor, version) - 0usize];
["Offset of field: BarylDescriptor::min_version"]
[::std::mem::offset_of!(BarylDescriptor, min_version) - 4usize];
["Offset of field: BarylDescriptor::name"]
[::std::mem::offset_of!(BarylDescriptor, name) - 8usize];
["Offset of field: BarylDescriptor::open"]
[::std::mem::offset_of!(BarylDescriptor, open) - 16usize];
["Offset of field: BarylDescriptor::run"]
[::std::mem::offset_of!(BarylDescriptor, run) - 24usize];
["Offset of field: BarylDescriptor::control"]
[::std::mem::offset_of!(BarylDescriptor, control) - 32usize];
["Offset of field: BarylDescriptor::close"]
[::std::mem::offset_of!(BarylDescriptor, close) - 40usize];
};