2015-10-18 13:58:17 +00:00
|
|
|
#[macro_use] extern crate clap;
|
2015-10-26 19:53:12 +00:00
|
|
|
#[macro_use] extern crate log;
|
2015-11-09 17:33:44 +00:00
|
|
|
#[macro_use] extern crate serde;
|
2015-11-08 16:32:43 +00:00
|
|
|
#[macro_use] extern crate serde_json;
|
2015-11-20 14:33:40 +00:00
|
|
|
#[macro_use] extern crate glob;
|
2015-10-26 22:51:44 +00:00
|
|
|
extern crate config;
|
2015-10-28 16:26:46 +00:00
|
|
|
extern crate regex;
|
2015-10-18 13:58:17 +00:00
|
|
|
|
2015-10-26 23:02:42 +00:00
|
|
|
use cli::CliConfig;
|
2015-10-26 22:51:44 +00:00
|
|
|
use configuration::Configuration;
|
2015-10-26 19:53:12 +00:00
|
|
|
use runtime::{ImagLogger, Runtime};
|
2015-10-25 18:47:17 +00:00
|
|
|
use clap::App;
|
2015-10-18 13:58:17 +00:00
|
|
|
|
|
|
|
mod cli;
|
2015-10-26 22:51:44 +00:00
|
|
|
mod configuration;
|
2015-10-18 18:52:52 +00:00
|
|
|
mod runtime;
|
2015-10-24 15:46:01 +00:00
|
|
|
mod module;
|
2015-10-18 19:59:17 +00:00
|
|
|
mod storage;
|
2015-10-18 13:58:17 +00:00
|
|
|
|
|
|
|
fn main() {
|
2015-10-25 18:47:17 +00:00
|
|
|
let yaml = load_yaml!("../etc/cli.yml");
|
|
|
|
let app = App::from_yaml(yaml);
|
2015-10-26 23:02:42 +00:00
|
|
|
let mut config = CliConfig::new(app);
|
2015-10-26 21:30:15 +00:00
|
|
|
let configuration = Configuration::new(&config);
|
2015-10-18 18:52:52 +00:00
|
|
|
|
2015-10-26 22:59:24 +00:00
|
|
|
let logger = ImagLogger::init(&configuration, &config);
|
2015-10-26 20:26:55 +00:00
|
|
|
debug!("Logger created!");
|
|
|
|
|
2015-10-26 23:01:11 +00:00
|
|
|
let rt = Runtime::new(configuration, config);
|
2015-10-26 20:26:55 +00:00
|
|
|
debug!("Runtime created!");
|
2015-10-18 18:52:52 +00:00
|
|
|
|
2015-10-26 19:55:31 +00:00
|
|
|
info!("Hello, world!");
|
2015-10-18 13:58:17 +00:00
|
|
|
}
|