From 9f509a929f0c76d20030cd0eeca43181ff9842e6 Mon Sep 17 00:00:00 2001 From: Ayrton Chilibeck Date: Fri, 12 Jan 2024 13:21:04 -0700 Subject: [PATCH] Added structs for config data --- src/util/config.rs | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/util/config.rs b/src/util/config.rs index dd12d12..97dd99c 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -1 +1,32 @@ +use std::{path::PathBuf, collections::HashMap}; + use serde_yaml; + +#[derive(Default)] +struct Config { + executable_paths: HashMap, + + input_path: PathBuf, + output_path: PathBuf, + + toolchains: Vec, +} + +#[derive(Default)] +struct Toolchain { + name: String, + steps: Vec, +} + +#[derive(Default)] +struct Step { + name: String, + + executable_path: Option, // if None then we use the current executable path + arguments: Vec, // special string $INPUT corresponds to previous step output + output: String, // the output file name +} + +pub fn parse_config(path: PathBuf) { + +}