Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (43 sloc) 1006 Bytes
#![feature(conservative_impl_trait)]
#![feature(generator_trait)]
#![feature(generators)]
#![feature(never_type)]
extern crate mio;
#[macro_use]
extern crate log;
extern crate env_logger;
#[macro_use]
extern crate clap;
extern crate httparse;
#[macro_use]
mod base;
mod net;
mod core;
mod apps;
use clap::App;
use core::Core;
fn main() {
env_logger::init().unwrap();
let mut core = Core::new();
let yaml = load_yaml!("cli.yaml");
let matches = App::from_yaml(yaml).get_matches();
let app = match matches.subcommand_name() {
Some("echo") => {
core.run(apps::echo::serve());
}
Some("simple_http") => {
core.run(apps::simple_http::serve());
}
Some("iter") => {
apps::iter::run();
}
Some("dataflow") => {
apps::dataflow::run();
}
Some(n) => unreachable!(),
None => {
error!("no subcommand provided");
return;
}
};
}
You can’t perform that action at this time.