From c95ec13ffe7020fae556a0606a631331e3054d1a Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Wed, 10 May 2017 02:25:59 -0700 Subject: [PATCH] Begin moving web server to a separate crate. (#448) r=bgrins This doesn't yet introduce a working Cargo.toml for 'mentatweb', but it does allow RLS to build correctly without errors, and it reduces the core library's dependency space, which is more important in the short term. --- Cargo.toml | 2 -- {src => tools/mentatweb/src}/main.rs | 10 ++++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename {src => tools/mentatweb/src}/main.rs (98%) diff --git a/Cargo.toml b/Cargo.toml index 358de0aa..00c0ecf6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,9 +18,7 @@ rustc_version = "0.1.7" [dependencies] chrono = "0.3" -clap = "2.23" error-chain = "0.8.1" -nickel = "0.9.0" time = "0.1" [dependencies.rusqlite] diff --git a/src/main.rs b/tools/mentatweb/src/main.rs similarity index 98% rename from src/main.rs rename to tools/mentatweb/src/main.rs index ca1e2e02..ae9e3bb7 100644 --- a/src/main.rs +++ b/tools/mentatweb/src/main.rs @@ -9,17 +9,19 @@ // specific language governing permissions and limitations under the License. extern crate clap; -#[macro_use] extern crate nickel; -use nickel::{Nickel, HttpRouter}; +#[macro_use] +extern crate nickel; extern crate mentat; -use clap::{App, Arg, SubCommand, AppSettings}; - use std::u16; use std::str::FromStr; +use clap::{App, Arg, SubCommand, AppSettings}; + +use nickel::{Nickel, HttpRouter}; + fn main() { let app = App::new("Mentat").setting(AppSettings::ArgRequiredElseHelp); let matches = app.subcommand(SubCommand::with_name("serve")