#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(missing_docs)]
#![allow(unsafe_code)]
use std::{
ffi::{c_char, c_int, c_longlong, c_short},
mem::size_of,
};
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
use lc_framework_src as _;
#[expect(clippy::manual_assert)]
pub const MAX_STAGES: usize = const {
if max_stages < 0 {
panic!("max_stages must not be negative");
}
let _: c_int = max_stages;
if size_of::<c_int>() > size_of::<usize>() {
panic!("max_stages might not fit into usize");
}
max_stages as usize
};
#[expect(clippy::manual_assert)]
const _: () = const {
if CS % 8 != 0 {
panic!("CS must be a multiple of 8")
}
};
#[cfg(not(target_endian = "little"))]
compile_error!("LC framework only supports little-endian systems");
#[expect(clippy::manual_assert)]
const _: () = const {
if size_of::<c_longlong>() != 8 {
panic!("long long must be 8 bytes")
}
};
#[expect(clippy::manual_assert)]
const _: () = const {
if size_of::<c_int>() != 4 {
panic!("int must be 4 bytes")
}
};
#[expect(clippy::manual_assert)]
const _: () = const {
if size_of::<c_short>() != 2 {
panic!("short must be 2 bytes")
}
};
#[expect(clippy::manual_assert)]
const _: () = const {
if size_of::<c_char>() != 1 {
panic!("char must be 1 byte")
}
};