use serde::Deserialize;
#[derive(Debug, Clone)]
pub struct CompileOptions {
pub target: Option<String>,
pub profile: String,
pub cargo_flags: Vec<String>,
pub jobs: Option<u32>,
}
impl Default for CompileOptions {
fn default() -> Self {
Self {
target: None,
profile: "debug".to_string(),
cargo_flags: Vec::new(),
jobs: None,
}
}
}
#[derive(Debug, Clone, Deserialize)]
pub struct CargoToml {
pub package: Option<CargoPackage>,
pub lib: Option<CargoLib>,
pub dependencies: Option<toml::Value>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct CargoPackage {
pub name: String,
pub version: String,
pub description: Option<String>,
pub authors: Option<Vec<String>>,
pub keywords: Option<Vec<String>>,
#[serde(rename = "rust-version")]
pub rust_version: Option<String>,
}
#[derive(Debug, Clone, Deserialize)]
pub struct CargoLib {
#[serde(rename = "crate-type")]
pub crate_type: Option<Vec<String>>,
}
pub const MANIFEST_FILENAME: &str = "manifest.json";
pub const CLOACINA_VERSION: &str = env!("CARGO_PKG_VERSION");