39 lines
1.1 KiB
Rust
39 lines
1.1 KiB
Rust
|
use serde::Deserialize;
|
||
|
use std::collections::HashMap;
|
||
|
|
||
|
#[derive(Debug, Clone, Deserialize)]
|
||
|
#[serde(deny_unknown_fields)]
|
||
|
pub struct ParsedTarget {
|
||
|
pub outfile: Option<String>,
|
||
|
pub compiler: Option<String>,
|
||
|
pub compiler_flags: Option<Vec<String>>,
|
||
|
pub linker: Option<String>,
|
||
|
pub linker_flags: Option<Vec<String>>,
|
||
|
pub linker_libs: Option<Vec<String>>,
|
||
|
pub sources: Option<Vec<String>>,
|
||
|
pub opts: Option<ParsedTargetOptions>,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, Clone, Deserialize)]
|
||
|
#[serde(deny_unknown_fields)]
|
||
|
pub struct ParsedTargetOptions {
|
||
|
pub inherit: Option<bool>,
|
||
|
pub inherit_from: Option<String>,
|
||
|
pub default: Option<bool>,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, Clone, Deserialize)]
|
||
|
#[serde(deny_unknown_fields)]
|
||
|
pub struct ParsedConfigTable {
|
||
|
pub build_dir: Option<String>,
|
||
|
pub compile_commands: Option<bool>,
|
||
|
pub compile_commands_target: Option<String>,
|
||
|
}
|
||
|
|
||
|
#[derive(Debug, Clone, Deserialize)]
|
||
|
#[serde(deny_unknown_fields)]
|
||
|
pub struct NgenToml {
|
||
|
pub config: Option<ParsedConfigTable>,
|
||
|
pub targets: Option<HashMap<String, ParsedTarget>>,
|
||
|
}
|