diff --git a/tools/src/main.rs b/tools/src/main.rs index 9a181f3..73d4bbf 100644 --- a/tools/src/main.rs +++ b/tools/src/main.rs @@ -14,6 +14,15 @@ struct Args { #[derive(Debug, serde::Deserialize)] struct Input { + /// Each input has either a `quantity` (for discrete things, like + /// apples or bearings) or an `amount` (for continuous things, + /// like rope or flour). + /// + /// FIXME: Is there a good way to handle the "units" of the + /// quantity/amount? Maybe the units could default to "count", but + /// be optionally overridden by the recipe to things like "meters" + /// (of tubing) or "grams" (of chromic acid). Then this struct + /// would be `quantity: usize, units: Option`. quantity: Option, amount: Option, } @@ -36,7 +45,10 @@ struct Action { #[derive(Debug, serde::Deserialize)] struct Recipe { + /// `[inputs]` is a Table where each key the the name (unique id) + /// of a recipe in the repo, and the value is an Input object. inputs: std::collections::HashMap, + dependencies: Dependencies, action: Action, outputs: Option>,