1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
//! Simple CLI to request recipes.
#![cfg(feature = "bin")]
use fcalc::{ITEMS, RECIPES};
use lazy_static::lazy_static;
use std::env::var;
lazy_static! {
pub static ref VERSION: String = var("CARGO_PKG_VERSION").unwrap();
}
fn main() {
println!("fcalc {} - Factorio Calculator", *VERSION);
let product = ITEMS.lookup("Iron Plate").unwrap();
let recipe = RECIPES.lookup(&product).unwrap();
println!("{}", recipe)
}