Made Config struct public
parent
2d7e711930
commit
ea823a2ea2
|
@ -5,39 +5,39 @@ use serde_yaml::{self};
|
|||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Config {
|
||||
tested_executables: Vec<Team>,
|
||||
pub tested_executables: Vec<Team>,
|
||||
|
||||
input_path: PathBuf,
|
||||
output_path: PathBuf,
|
||||
in_stream_path: PathBuf,
|
||||
pub input_path: PathBuf,
|
||||
pub output_path: PathBuf,
|
||||
pub in_stream_path: PathBuf,
|
||||
|
||||
runtimes: Option<Vec<Team>>,
|
||||
pub runtimes: Option<Vec<Team>>,
|
||||
|
||||
toolchains: Vec<Toolchain>,
|
||||
pub toolchains: Vec<Toolchain>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Team {
|
||||
name: String,
|
||||
executable: PathBuf,
|
||||
pub name: String,
|
||||
pub executable: PathBuf,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Toolchain {
|
||||
name: String,
|
||||
steps: Vec<Step>,}
|
||||
pub name: String,
|
||||
pub steps: Vec<Step>,}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct Step {
|
||||
name: String,
|
||||
pub name: String,
|
||||
|
||||
executable_path: Option<PathBuf>, // if None then we use the current executable path
|
||||
arguments: Vec<String>, // special string $INPUT corresponds to previous step output
|
||||
output: String, // the output file name
|
||||
pub executable_path: Option<PathBuf>, // if None then we use the current executable path
|
||||
pub arguments: Vec<String>, // special string $INPUT corresponds to previous step output
|
||||
pub output: String, // the output file name
|
||||
|
||||
uses_runtime: Option<bool>,
|
||||
uses_in_stream: Option<bool>,
|
||||
allow_error: Option<bool>
|
||||
pub uses_runtime: Option<bool>,
|
||||
pub uses_in_stream: Option<bool>,
|
||||
pub allow_error: Option<bool>
|
||||
}
|
||||
|
||||
pub fn parse_config(path: PathBuf) -> Config {
|
||||
|
|
Loading…
Reference in New Issue