#![forbid(unsafe_code)]
#![allow(clippy::cognitive_complexity)]
use crate::target::LibraryTarget;
use serde_derive::{Deserialize, Serialize};
pub mod cpp_build_config;
pub mod cpp_lib_builder;
pub mod env_var_names;
pub mod errors;
pub mod file_utils;
pub mod string_utils;
pub mod target;
pub mod utils;
use std::ops::Deref;
pub use toml;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct BuildScriptData {
pub cpp_build_config: cpp_build_config::CppBuildConfig,
pub cpp_wrapper_lib_name: String,
pub known_targets: Vec<LibraryTarget>,
}
#[derive(Debug)]
pub struct ReadOnly<T>(T);
impl<T> ReadOnly<T> {
pub fn new(value: T) -> Self {
ReadOnly(value)
}
pub fn into_inner(self) -> T {
self.0
}
}
impl<T> Deref for ReadOnly<T> {
type Target = T;
fn deref(&self) -> &T {
&self.0
}
}
#[cfg(test)]
mod tests;