Remove printers

This commit is contained in:
Ian Wijma 2024-04-03 23:29:33 +11:00
parent 7e286eace5
commit aba453b571
2 changed files with 28 additions and 2 deletions

View File

@ -11,8 +11,11 @@ glob = "0.3.1"
serde = { version = "1.0.197", features = ["derive"] }
serde_yaml = "0.9.34"
[profile.dev]
opt-level = 0
[profile.release]
strip = true # Automatically strip symbols from the binary.
opt-level = "z" # Optimize for size.
lto = true
codegen-units = 1
codegen-units = 1

View File

@ -32,7 +32,8 @@ pub fn run (arguments: &Arguments) -> Result<(), String> {
// Resolve dependencies based on the directory structure
// (In the future this will be configurable based on a dependency config field)
// let config_structure: ConfigStructure = resolve_config_structure(configs);
let config_structure: ConfigStructure = resolve_config_structure(configs)?;
println!("config_structure: {:?}", config_structure);
// Gather the tasks from the config
// let task_structure: TaskStructure = resolve_task_structure(config_structure, task_name);
@ -45,6 +46,28 @@ pub fn run (arguments: &Arguments) -> Result<(), String> {
Ok(())
}
#[derive(Debug, Clone)]
struct ConfigStructure {
config: Config,
child: HashMap<String, ConfigStructure>
}
fn resolve_config_structure(_configs: Vec<Config>) -> Result<ConfigStructure, String> {
let _path_map: HashMap<PathBuf, Config> = HashMap::new();
// TODO: Create a recursive method that creates the config structure based on the directories.
let config_structure = ConfigStructure {
config: Config{
name: "".to_string(),
tasks: Default::default(),
path: Default::default(),
},
child: HashMap::new()
};
Ok(config_structure)
}
#[derive(Debug, Clone)]
enum TaskType {
SHELL