├── .gitignore ├── src ├── util │ ├── mod.rs │ └── fs.rs ├── http │ ├── file.rs │ ├── ping.rs │ ├── completion.rs │ ├── definition.rs │ └── mod.rs ├── engine │ ├── error.rs │ ├── mod.rs │ └── my_racer.rs ├── bin │ └── racerd.rs └── lib.rs ├── scripts ├── wrk_completion_bench.lua.tpl ├── assert_cargo_lock_unchanged └── run_wrk_benchmarks.py ├── .travis.yml ├── Cargo.toml ├── appveyor.yml ├── tests ├── util │ ├── mod.rs │ └── http.rs └── lib.rs ├── README.md ├── docs └── API.md ├── LICENSE └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /src/util/mod.rs: -------------------------------------------------------------------------------- 1 | //! Som misc shared functionality 2 | pub mod fs; 3 | -------------------------------------------------------------------------------- /src/http/file.rs: -------------------------------------------------------------------------------- 1 | use iron::prelude::*; 2 | 3 | /// Parse a file and return a list of issues (warnings, errors) encountered 4 | pub fn parse(_: &mut Request) -> IronResult { 5 | unimplemented!(); 6 | } 7 | -------------------------------------------------------------------------------- /src/http/ping.rs: -------------------------------------------------------------------------------- 1 | use iron::prelude::*; 2 | use iron::status; 3 | 4 | /// Check if the server is accepting requests 5 | pub fn pong(_: &mut Request) -> IronResult { 6 | Ok(Response::with((status::Ok, "{\"pong\": true}"))) 7 | } 8 | -------------------------------------------------------------------------------- /scripts/wrk_completion_bench.lua.tpl: -------------------------------------------------------------------------------- 1 | wrk.method = "POST" 2 | wrk.path = "/list_completions" 3 | wrk.body = "{ \"buffers\" : [ { \"file_path\" : \"src.rs\" , \"contents\" : \"\\nfn main() {\\n[[[completion]]]\\n}\\n\" } ] , \"file_path\" : \"src.rs\" , \"line\" : 3 , \"column\" : [[[column]]] }" 4 | wrk.headers["Content-Type"] = "application/json" 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | 3 | rust: 4 | - nightly 5 | 6 | cache: cargo 7 | 8 | before_script: 9 | - rustup component add rust-src 10 | - export RUST_SRC_PATH=`rustc --print sysroot`/lib/rustlib/src/rust/src 11 | 12 | script: 13 | - cargo build --verbose --all 14 | - cargo test --verbose --all 15 | - scripts/assert_cargo_lock_unchanged 16 | -------------------------------------------------------------------------------- /scripts/assert_cargo_lock_unchanged: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo_red() { 4 | echo -e "\033[31m$@\033[0m" 5 | } 6 | 7 | # Check that Cargo.lock does not have unstaged changes 8 | if [ "$(git status | grep Cargo.lock | wc -l | tr -d '[[:space:]]')" != "0" ] 9 | then 10 | echo_red "Changes detected in Cargo.lock after building" 11 | echo_red "Please rebuild the project locally and commit Cargo.lock." 12 | 13 | git --no-pager diff Cargo.lock 14 | 15 | exit 1 16 | fi 17 | 18 | exit 0 19 | 20 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "libracerd" 3 | version = "0.3.3" 4 | authors = ["Joe Wilm "] 5 | 6 | [dependencies] 7 | bodyparser = "0.8" 8 | docopt = "1" 9 | env_logger = "0.5" 10 | iron = { version = "0.6", default-features = false } 11 | iron-hmac = { version = "0.6", features = ["hmac-rust-crypto"] } 12 | log = "0.4" 13 | logger = "0.4" 14 | persistent = "0.4" 15 | racer = "2.1" 16 | rand = "0.5" 17 | regex = "1" 18 | router = "0.6.0" 19 | serde = "1" 20 | serde_json = "1" 21 | serde_derive = "1" 22 | rls-span = "0.5" 23 | 24 | [dev-dependencies] 25 | rust-crypto = "0.2.36" 26 | rustc-serialize = "0.3" 27 | hyper = { version = "0.10", default-features = false } 28 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | install: 2 | # Download and install Rust and Cargo using rustup. 3 | - appveyor DownloadFile https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe 4 | - rustup-init.exe -y 5 | - set PATH=%USERPROFILE%\.cargo\bin;%PATH% 6 | - rustup update 7 | - rustup install nightly 8 | - rustup default nightly 9 | - rustc -Vv 10 | - cargo -V 11 | # Download Rust sources. 12 | - rustup component add rust-src 13 | - for /f %%i in ('rustc --print sysroot') do set RUST_SRC_PATH=%%i\lib\rustlib\src\rust\src 14 | - set RUST_BACKTRACE=1 15 | 16 | build: false 17 | 18 | cache: 19 | - '%USERPROFILE%\.cargo' 20 | 21 | test_script: 22 | - cargo test --verbose 23 | -------------------------------------------------------------------------------- /src/engine/error.rs: -------------------------------------------------------------------------------- 1 | use std::error; 2 | use std::fmt; 3 | 4 | use std::io; 5 | 6 | /// Error type for semantic engine module 7 | #[derive(Debug)] 8 | pub enum Error { 9 | IoError(io::Error), 10 | Racer, 11 | } 12 | 13 | impl error::Error for Error { 14 | fn description(&self) -> &str { 15 | match *self { 16 | Error::IoError(_) => "io::Error during engine operation", 17 | Error::Racer => "Internal racer error", 18 | } 19 | } 20 | 21 | fn cause(&self) -> Option<&dyn error::Error> { 22 | match *self { 23 | Error::IoError(ref err) => Some(err), 24 | Error::Racer => None, 25 | } 26 | } 27 | } 28 | 29 | impl fmt::Display for Error { 30 | fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { 31 | match *self { 32 | Error::IoError(ref e) => write!(fmt, "io::Error({})", e), 33 | Error::Racer => write!(fmt, "Internal racer error"), 34 | } 35 | } 36 | } 37 | 38 | impl From for Error { 39 | fn from(err: io::Error) -> Error { 40 | Error::IoError(err) 41 | } 42 | } 43 | 44 | /// Result type for semantic engine module 45 | pub type Result = std::result::Result; 46 | -------------------------------------------------------------------------------- /tests/util/mod.rs: -------------------------------------------------------------------------------- 1 | use rustc_serialize::hex::ToHex; 2 | 3 | use crypto::hmac::Hmac; 4 | use crypto::mac::Mac; 5 | use crypto::sha2::Sha256; 6 | 7 | #[macro_use] 8 | pub mod http; 9 | 10 | pub fn hmac256(secret: &[u8], data: &[u8]) -> Vec { 11 | let mut hmac = Hmac::new(Sha256::new(), secret); 12 | 13 | let len = hmac.output_bytes(); 14 | let mut result = Vec::with_capacity(len); 15 | 16 | for _ in 0..len { 17 | result.push(0); 18 | } 19 | 20 | hmac.input(data); 21 | hmac.raw_result(&mut result[..]); 22 | 23 | result 24 | } 25 | 26 | pub fn request_hmac(secret_str: &str, method: &str, path: &str, body: &str) -> String { 27 | // hmac(hmac(GET) + hmac(/ping) + hmac()) 28 | let secret = secret_str.as_bytes(); 29 | 30 | let method_hmac = hmac256(secret, method.as_bytes()); 31 | let path_hmac = hmac256(secret, path.as_bytes()); 32 | let body_hmac = hmac256(secret, body.as_bytes()); 33 | 34 | let mut meta = Hmac::new(Sha256::new(), secret); 35 | meta.input(&method_hmac[..]); 36 | meta.input(&path_hmac[..]); 37 | meta.input(&body_hmac[..]); 38 | 39 | let len = meta.output_bytes(); 40 | let mut result = Vec::with_capacity(len); 41 | 42 | for _ in 0..len { 43 | result.push(0); 44 | } 45 | 46 | meta.raw_result(&mut result[..]); 47 | result.to_hex() 48 | } 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | racerd 2 | ====== 3 | 4 | JSON/HTTP Server based on [racer][] for adding Rust support to editors and IDEs 5 | 6 | [![Build Status](https://travis-ci.org/jwilm/racerd.svg?branch=master)](https://travis-ci.org/jwilm/racerd) 7 | [![Build status](https://ci.appveyor.com/api/projects/status/ysdf6dlxv73am0s5/branch/master?svg=true)](https://ci.appveyor.com/project/jwilm/racerd/branch/master) 8 | 9 | ![racerd_ycm](https://cloud.githubusercontent.com/assets/4285147/11676180/e924255e-9de4-11e5-9b32-5eda431f79a3.gif) 10 | 11 | _YouCompleteMe in vim powered by racerd_ 12 | 13 | 14 | ## Documentation 15 | 16 | - [HTTP API](docs/API.md) 17 | - [Rust Documentation](http://jwilm.github.io/racerd/libracerd/) 18 | - [racerd options](https://github.com/jwilm/racerd/blob/master/src/bin/racerd.rs#L14) 19 | 20 | 21 | ## Features 22 | 23 | - Find definition & list completions support via racer 24 | - Searches rust standard library and dependency crates 25 | - HMAC authentication 26 | - Usable as both library and executable 27 | - Library API offers direct calls to avoid HTTP overhead 28 | 29 | 30 | [rust-openssl]: https://github.com/sfackler/rust-openssl 31 | [rust-openssl's manual configuration instructions]: https://github.com/sfackler/rust-openssl#manual-configuration 32 | [YouCompleteMe]: https://github.com/Valloric/YouCompleteMe 33 | [racer]: https://github.com/phildawes/racer 34 | [API.md]: docs/API.md 35 | -------------------------------------------------------------------------------- /src/bin/racerd.rs: -------------------------------------------------------------------------------- 1 | extern crate docopt; 2 | extern crate env_logger; 3 | extern crate libracerd; 4 | #[macro_use] 5 | extern crate serde_derive; 6 | 7 | use libracerd::engine::SemanticEngine; 8 | use libracerd::{engine, http, Config}; 9 | 10 | use std::convert::Into; 11 | 12 | use docopt::Docopt; 13 | 14 | const VERSION: &str = env!("CARGO_PKG_VERSION"); 15 | const USAGE: &str = " 16 | racerd - a JSON/HTTP layer on top of racer 17 | 18 | Usage: 19 | racerd serve [--secret-file=] [--port=] [--addr=
] [-l] [--rust-src-path=] 20 | racerd (-h | --help) 21 | racerd --version 22 | 23 | Options: 24 | -c, --rust-src-path= Use the given path for std library completions 25 | -l, --logging Print http logs. 26 | -h, --help Show this message. 27 | -p, --port= Listen on this port [default: 3048]. 28 | -a, --addr=
Listen on this address [default: 127.0.0.1]. 29 | -s, --secret-file= Path to the HMAC secret file. File will be destroyed after being read. 30 | --version Print the version and exit. 31 | "; 32 | 33 | #[derive(Debug, Deserialize)] 34 | struct Args { 35 | flag_port: u16, 36 | flag_addr: String, 37 | flag_version: bool, 38 | flag_secret_file: Option, 39 | flag_logging: bool, 40 | flag_rust_src_path: Option, 41 | cmd_serve: bool, 42 | } 43 | 44 | impl Into for Args { 45 | fn into(self) -> Config { 46 | Config { 47 | port: self.flag_port as u16, 48 | secret_file: self.flag_secret_file, 49 | print_http_logs: self.flag_logging, 50 | rust_src_path: self.flag_rust_src_path, 51 | addr: self.flag_addr, 52 | } 53 | } 54 | } 55 | 56 | fn main() { 57 | // Start logging 58 | env_logger::init(); 59 | 60 | // Parse arguments 61 | let args: Args = Docopt::new(USAGE) 62 | .and_then(|d| d.deserialize()) 63 | .unwrap_or_else(|e| e.exit()); 64 | 65 | // Print version and exit if --version was specified 66 | if args.flag_version { 67 | println!("racerd version {}", VERSION); 68 | std::process::exit(0); 69 | } 70 | 71 | // build config object 72 | let config: Config = args.into(); 73 | 74 | // TODO start specified semantic engine. For now, hard coded racer. 75 | let racer = engine::Racer::new(); 76 | racer.initialize(&config).unwrap(); 77 | 78 | // Start serving 79 | let server = http::serve(&config, racer).unwrap(); 80 | println!("racerd listening at {}", server.addr()); 81 | } 82 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! libracerd provides an http server and set of completion engines for consumption by rust 2 | //! developer tools. The http server itself is a few JSON endpoints providing completion, definition 3 | //! look-up, and compilation. The endpoints are backed by an object implementing `SemanticEngine` 4 | //! 5 | //! Documentation for the HTTP endpoints can be found in the http module header. 6 | //! 7 | //! This project's source code is [available on GitHub](https://github.com/jwilm/racerd). 8 | extern crate serde; 9 | extern crate serde_json; 10 | #[macro_use] 11 | extern crate serde_derive; 12 | 13 | #[macro_use] 14 | extern crate router; // Iron routing handler 15 | extern crate bodyparser; // Iron body parsing middleware 16 | extern crate iron; // http framework 17 | extern crate iron_hmac; 18 | extern crate logger; // Iron logging middleware 19 | extern crate persistent; // Iron storage middleware 20 | extern crate rls_span; 21 | 22 | #[macro_use] 23 | extern crate log; // log macros 24 | extern crate racer; // rust code analysis 25 | 26 | extern crate rand; 27 | extern crate regex; 28 | 29 | pub mod engine; 30 | pub mod http; 31 | pub mod util; 32 | 33 | use std::fs::File; 34 | use std::io::Read; 35 | 36 | /// Configuration flags and values 37 | /// 38 | /// This object contains all switches the consumer has control of. 39 | #[derive(Debug)] 40 | pub struct Config { 41 | pub port: u16, 42 | pub addr: String, 43 | pub secret_file: Option, 44 | pub print_http_logs: bool, 45 | pub rust_src_path: Option, 46 | } 47 | 48 | impl Default for Config { 49 | fn default() -> Config { 50 | Config { 51 | port: 0, 52 | addr: "127.0.0.1".to_owned(), 53 | secret_file: None, 54 | print_http_logs: false, 55 | rust_src_path: None, 56 | } 57 | } 58 | } 59 | 60 | impl Config { 61 | /// Build a default config object 62 | pub fn new() -> Config { 63 | Default::default() 64 | } 65 | 66 | /// Return contents of secret file 67 | /// 68 | /// panics if self.secret_file is None or an error is encountered while reading the file. 69 | pub fn read_secret_file(&self) -> Vec { 70 | self.secret_file 71 | .as_ref() 72 | .map(|secret_file_path| { 73 | let buf = { 74 | let mut f = File::open(secret_file_path).unwrap(); 75 | let mut buf = Vec::new(); 76 | f.read_to_end(&mut buf).unwrap(); 77 | buf 78 | }; 79 | 80 | std::fs::remove_file(secret_file_path).unwrap(); 81 | 82 | buf 83 | }) 84 | .unwrap() 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/util/fs.rs: -------------------------------------------------------------------------------- 1 | //! fs utilities (eg. TmpFile) 2 | use rand::distributions::Alphanumeric; 3 | use std::convert::From; 4 | use std::fs::{self, File}; 5 | use std::io::Write; 6 | use std::path::{Path, PathBuf}; 7 | use std::thread; 8 | 9 | /// A temporary file that is removed on drop 10 | /// 11 | /// With the new constructor, you provide contents and a file is created based on the name of the 12 | /// current task. The with_name constructor allows you to choose a name. Neither forms are secure, 13 | /// and both are subject to race conditions. 14 | pub struct TmpFile { 15 | path_buf: PathBuf, 16 | } 17 | 18 | impl TmpFile { 19 | /// Create a temp file with random name and `contents`. 20 | pub fn new(contents: &str) -> TmpFile { 21 | let tmp = TmpFile { 22 | path_buf: TmpFile::mktemp(), 23 | }; 24 | 25 | tmp.write_contents(contents); 26 | tmp 27 | } 28 | 29 | /// Create a file with `name` and `contents`. 30 | pub fn with_name(name: &str, contents: &str) -> TmpFile { 31 | let tmp = TmpFile { 32 | path_buf: PathBuf::from(name), 33 | }; 34 | 35 | tmp.write_contents(contents); 36 | tmp 37 | } 38 | 39 | fn write_contents(&self, contents: &str) { 40 | let mut f = File::create(self.path()).unwrap(); 41 | f.write_all(contents.as_bytes()).unwrap(); 42 | f.flush().unwrap(); 43 | } 44 | 45 | /// Make path for tmpfile. Stole this from racer's tests. 46 | fn mktemp() -> PathBuf { 47 | use rand::Rng; 48 | 49 | let thread = thread::current(); 50 | let taskname = thread.name().unwrap(); 51 | let s = taskname.replace("::", "_"); 52 | let mut p = "tmpfile.".to_string(); 53 | p.push_str(&s[..]); 54 | // Add some random chars 55 | for c in rand::thread_rng().sample_iter(&Alphanumeric).take(5) { 56 | p.push(c); 57 | } 58 | PathBuf::from(p) 59 | } 60 | 61 | /// Get the Path of the TmpFile 62 | pub fn path(&self) -> &Path { 63 | self.path_buf.as_path() 64 | } 65 | } 66 | 67 | impl Drop for TmpFile { 68 | fn drop(&mut self) { 69 | fs::remove_file(self.path_buf.as_path()).unwrap(); 70 | } 71 | } 72 | 73 | #[test] 74 | #[allow(unused_variables)] 75 | fn tmp_file_works() { 76 | fn exists(p: &Path) -> bool { 77 | match std::fs::metadata(p) { 78 | Ok(_) => true, 79 | Err(_) => false, 80 | } 81 | } 82 | 83 | use std::fs::File; 84 | use std::io::Read; 85 | use std::path::Path; 86 | 87 | let path_str = "test.txt"; 88 | let path = &Path::new(path_str); 89 | assert!(!exists(path)); 90 | 91 | let contents = "hello, for a moment"; 92 | 93 | { 94 | let file = TmpFile::with_name(path_str, contents); 95 | assert!(exists(path)); 96 | 97 | let mut f = File::open(path_str).unwrap(); 98 | let mut s = String::new(); 99 | f.read_to_string(&mut s).unwrap(); 100 | assert_eq!(s, contents); 101 | } 102 | 103 | assert!(!exists(path)); 104 | } 105 | -------------------------------------------------------------------------------- /src/engine/mod.rs: -------------------------------------------------------------------------------- 1 | use std::path::Path; 2 | 3 | /// This module's Error and Result types 4 | mod error; 5 | pub use self::error::{Error, Result}; 6 | 7 | use crate::Config; 8 | 9 | /// Provide completions, definitions, and analysis of rust source code 10 | pub trait SemanticEngine: Send + Sync { 11 | /// Perform any necessary initialization. 12 | /// 13 | /// Only needs to be called once when an engine is created. 14 | fn initialize(&self, config: &Config) -> Result<()>; 15 | 16 | /// Find the definition for the item under the cursor 17 | fn find_definition(&self, context: &Context) -> Result>; 18 | 19 | /// Get a list of completions for the item under the cursor 20 | fn list_completions(&self, context: &Context) -> Result>>; 21 | } 22 | 23 | /// A possible completion for a location 24 | #[derive(Debug)] 25 | pub struct Completion { 26 | pub text: String, 27 | pub context: String, 28 | pub kind: String, 29 | pub file_path: String, 30 | pub position: CursorPosition, 31 | } 32 | 33 | /// Source file and type information for a found definition 34 | #[derive(Debug)] 35 | pub struct Definition { 36 | pub position: CursorPosition, 37 | pub text: String, 38 | pub text_context: String, 39 | pub dtype: String, 40 | pub file_path: String, 41 | pub docs: String, 42 | } 43 | 44 | /// Context for a given operation. 45 | /// 46 | /// All operations require a buffer holding the contents of a file, the file's absolute path, and a 47 | /// cursor position to fully specify the request. This object holds all of those items. 48 | #[derive(Debug)] 49 | pub struct Context { 50 | pub buffers: Vec, 51 | pub query_cursor: CursorPosition, 52 | pub query_file: String, 53 | } 54 | 55 | impl Context { 56 | pub fn new(buffers: Vec, position: CursorPosition, file_path: T) -> Context 57 | where 58 | T: Into, 59 | { 60 | Context { 61 | buffers, 62 | query_cursor: position, 63 | query_file: file_path.into(), 64 | } 65 | } 66 | 67 | pub fn query_path(&self) -> &Path { 68 | &Path::new(&self.query_file[..]) 69 | } 70 | } 71 | 72 | /// Position of the cursor in a text file 73 | /// 74 | /// Similar to a point, it has two coordinates `line` and `col`. 75 | #[derive(Debug, Copy, Clone)] 76 | pub struct CursorPosition { 77 | pub line: usize, 78 | pub col: usize, 79 | } 80 | 81 | impl Into for CursorPosition { 82 | fn into(self) -> racer::Location { 83 | racer::Location::Coords(racer::Coordinate { 84 | row: rls_span::Row::new_one_indexed(self.line as u32), 85 | col: rls_span::Column::new_zero_indexed(self.col as u32), 86 | }) 87 | } 88 | } 89 | 90 | pub mod my_racer; 91 | pub use self::my_racer::Racer; 92 | 93 | #[derive(Debug, Deserialize, Clone)] 94 | pub struct Buffer { 95 | pub file_path: String, 96 | pub contents: String, 97 | } 98 | 99 | impl Buffer { 100 | pub fn path(&self) -> &Path { 101 | &Path::new(&self.file_path[..]) 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/http/completion.rs: -------------------------------------------------------------------------------- 1 | use iron::mime::Mime; 2 | use iron::prelude::*; 3 | use iron::status; 4 | 5 | use serde_json::to_string; 6 | 7 | use super::EngineProvider; 8 | use crate::engine::{Buffer, Completion, Context, CursorPosition}; 9 | 10 | /// Given a location, return a list of possible completions 11 | pub fn list(req: &mut Request) -> IronResult { 12 | let lcr = match req.get::<::bodyparser::Struct>() { 13 | Ok(Some(s)) => { 14 | trace!("parsed ListCompletionsRequest"); 15 | s 16 | } 17 | Ok(None) => { 18 | trace!("failed parsing ListCompletionsRequest"); 19 | return Ok(Response::with(status::BadRequest)); 20 | } 21 | Err(err) => { 22 | trace!("error while parsing ListCompletionsRequest"); 23 | return Err(IronError::new(err, status::InternalServerError)); 24 | } 25 | }; 26 | 27 | let mutex = req.get::<::persistent::Write>().unwrap(); 28 | let engine = mutex.lock().unwrap_or_else(|e| e.into_inner()); 29 | match engine.list_completions(&lcr.context()) { 30 | // 200 OK; found the definition 31 | Ok(Some(completions)) => { 32 | trace!("got a match"); 33 | let res = completions 34 | .into_iter() 35 | .map(CompletionResponse::from) 36 | .collect::>(); 37 | let content_type = "application/json".parse::().unwrap(); 38 | Ok(Response::with(( 39 | content_type, 40 | status::Ok, 41 | to_string(&res).unwrap(), 42 | ))) 43 | } 44 | 45 | // 204 No Content; Everything went ok, but the definition was not found. 46 | Ok(None) => { 47 | trace!("did not find any match"); 48 | Ok(Response::with(status::NoContent)) 49 | } 50 | 51 | // 500 Internal Server Error; Error occurred while searching for the definition 52 | Err(err) => { 53 | trace!("encountered an error"); 54 | Err(IronError::new(err, status::InternalServerError)) 55 | } 56 | } 57 | } 58 | 59 | #[derive(Debug, Deserialize, Clone)] 60 | struct ListCompletionsRequest { 61 | pub buffers: Vec, 62 | pub file_path: String, 63 | pub column: usize, 64 | pub line: usize, 65 | } 66 | 67 | impl ListCompletionsRequest { 68 | pub fn context(self) -> Context { 69 | let cursor = CursorPosition { 70 | line: self.line, 71 | col: self.column, 72 | }; 73 | Context::new(self.buffers, cursor, self.file_path) 74 | } 75 | } 76 | 77 | #[derive(Debug, Serialize)] 78 | struct CompletionResponse { 79 | text: String, 80 | context: String, 81 | kind: String, 82 | file_path: String, 83 | line: usize, 84 | column: usize, 85 | } 86 | 87 | impl From for CompletionResponse { 88 | fn from(c: Completion) -> CompletionResponse { 89 | CompletionResponse { 90 | text: c.text, 91 | context: c.context, 92 | kind: c.kind, 93 | file_path: c.file_path, 94 | line: c.position.line, 95 | column: c.position.col, 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /scripts/run_wrk_benchmarks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # vim: ts=4 sw=4 et cc=80 tw=79 3 | 4 | import subprocess 5 | import tempfile 6 | 7 | import os 8 | from os import path 9 | 10 | # Support overriding RACERD. Assume racerd is on path by default. 11 | if os.environ.has_key('RACERD'): 12 | RACERD = os.environ['RACERD'] 13 | else: 14 | RACERD = 'racerd' 15 | 16 | def get_scripts_dir(): 17 | """ 18 | Return absolute path of scripts directory 19 | """ 20 | return path.abspath(path.dirname(__file__)) 21 | 22 | def write_wrk_script(completion_string): 23 | """ 24 | Read the wrk template script, replace the completion string and column 25 | number, write a temporary file, and return the file path 26 | """ 27 | 28 | # Read the file 29 | tpl_file = open(get_wrk_template_path(), 'r') 30 | tpl = tpl_file.read() 31 | 32 | # Replace template params 33 | tpl = tpl.replace('[[[completion]]]', completion_string) 34 | tpl = tpl.replace('[[[column]]]', str(len(completion_string))) 35 | 36 | # Write temp file 37 | lua_file_fd, lua_file_path = tempfile.mkstemp(suffix='.lua', text=True) 38 | lua_file = os.fdopen(lua_file_fd, 'w') 39 | lua_file.write(tpl) 40 | lua_file.close() 41 | 42 | return lua_file_path 43 | 44 | 45 | def get_wrk_template_path(): 46 | """ 47 | A template lua script for wrk is used to generate completion requests. This 48 | function returns the path to the template script 49 | """ 50 | return path.join(get_scripts_dir(), 'wrk_completion_bench.lua.tpl') 51 | 52 | def start_racerd(): 53 | """ 54 | Spawn a racerd process on random port. Returns the process and host string. 55 | # Example 56 | (process, host) = start_racerd() 57 | """ 58 | process = subprocess.Popen( 59 | [RACERD, 'serve', '--secret-file=hah', '--port=0'], 60 | stdout = subprocess.PIPE 61 | ) 62 | 63 | racerd_listen_line = process.stdout.readline() 64 | racerd_host = racerd_listen_line.split(' ')[3] 65 | 66 | return (process, racerd_host.strip()) 67 | 68 | 69 | def run_wrk(script_path, host): 70 | """ 71 | Spawn a `wrk` process with 1 thread, 1 connection, and run for 1 second. 72 | These should probably be changed to environment variables in the future. 73 | """ 74 | base_url = 'http://' + host 75 | output = subprocess.check_output( 76 | ['wrk', '-t1', '-c1', '-d1s', '-s', script_path, base_url] 77 | ) 78 | 79 | lines = output.splitlines() 80 | 81 | # Line 3 in the second column by whitespace has the average request length. 82 | latency_line = lines[3] 83 | latency_avg = latency_line.split()[1] 84 | 85 | return latency_avg 86 | 87 | def print_report(completion_str, latency_avg): 88 | """ 89 | Print a report for given run 90 | """ 91 | print 'Completion for "' + completion_str + '" averaged ' + latency_avg 92 | 93 | def bench_completion(completion_str): 94 | """ 95 | Start racerd and run wrk for a given completion string 96 | """ 97 | 98 | # Write wrk script for this completion 99 | wrk_script_path = write_wrk_script(completion_str) 100 | 101 | # Start racerd and run wrk 102 | process, host = start_racerd() 103 | latency_avg = run_wrk(wrk_script_path, host) 104 | 105 | # Print a report 106 | print_report(completion_str, latency_avg) 107 | 108 | # cleanup 109 | process.terminate() 110 | os.remove(wrk_script_path) 111 | 112 | 113 | completions = [ 114 | 'use ::std::', 115 | 'use ::std::io::', 116 | 'use ::std::path::', 117 | 'use ::std::path::P' 118 | ] 119 | 120 | for c in completions: 121 | bench_completion(c) 122 | 123 | -------------------------------------------------------------------------------- /tests/util/http.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | use std::io::{Read, Write}; 3 | use std::ops::Deref; 4 | 5 | use libracerd::engine::{Racer, SemanticEngine}; 6 | use libracerd::Config; 7 | 8 | use hyper::method::Method; 9 | 10 | /// Smart pointer for libracerd http server. 11 | /// 12 | /// TestServer automatically closes the underlying server when going out of scope. 13 | pub struct TestServer { 14 | inner: ::libracerd::http::Server, 15 | } 16 | 17 | impl TestServer { 18 | pub fn new(secret_file: Option) -> TestServer { 19 | let engine = Racer::new(); 20 | let config = Config { 21 | secret_file: secret_file, 22 | print_http_logs: true, 23 | ..Default::default() 24 | }; 25 | 26 | engine.initialize(&config).unwrap(); 27 | 28 | TestServer { 29 | inner: ::libracerd::http::serve(&config, engine).unwrap(), 30 | } 31 | } 32 | } 33 | 34 | impl Deref for TestServer { 35 | type Target = ::libracerd::http::Server; 36 | fn deref(&self) -> &::libracerd::http::Server { 37 | &self.inner 38 | } 39 | } 40 | 41 | impl Drop for TestServer { 42 | fn drop(&mut self) { 43 | self.inner.close().unwrap(); 44 | } 45 | } 46 | 47 | pub trait UrlBuilder { 48 | /// Given a /url/path, return a full http URL. 49 | fn url(&self, path: &str) -> String; 50 | } 51 | 52 | impl UrlBuilder for TestServer { 53 | fn url(&self, path: &str) -> String { 54 | format!("http://{}{}", self.addr(), path) 55 | } 56 | } 57 | 58 | pub fn with_server(mut func: F) 59 | where 60 | F: FnMut(&TestServer) -> (), 61 | { 62 | func(&TestServer::new(None)); 63 | } 64 | 65 | pub fn with_hmac_server(secret: &str, mut func: F) 66 | where 67 | F: FnMut(&TestServer) -> (), 68 | { 69 | // Make a temp file unique to this test 70 | let thread = ::std::thread::current(); 71 | let taskname = thread.name().unwrap(); 72 | let s = taskname.replace("::", "_"); 73 | let mut p = "secretfile.".to_string(); 74 | p.push_str(&s[..]); 75 | 76 | { 77 | let mut f = File::create(&p[..]).unwrap(); 78 | f.write_all(secret.as_bytes()).unwrap(); 79 | f.flush().unwrap(); 80 | } 81 | 82 | func(&TestServer::new(Some(p))); 83 | } 84 | 85 | pub fn request_str( 86 | method: Method, 87 | url: &str, 88 | data: Option<&str>, 89 | ) -> ::hyper::Result> { 90 | use hyper::header; 91 | use hyper::status::StatusClass; 92 | use hyper::Client; 93 | 94 | let mut body = String::new(); 95 | 96 | let client = Client::new(); 97 | println!("url: {}", url); 98 | 99 | let mut res = match data { 100 | Some(inner) => { 101 | let builder = client 102 | .request(method, url) 103 | .header(header::Connection::close()) 104 | .header(header::ContentType::json()) 105 | .body(inner); 106 | 107 | builder.send()? 108 | } 109 | None => { 110 | let builder = client 111 | .request(method, url) 112 | .header(header::Connection::close()); 113 | 114 | builder.send()? 115 | } 116 | }; 117 | 118 | Ok(match res.status.class() { 119 | StatusClass::Success => { 120 | res.read_to_string(&mut body)?; 121 | Some(body) 122 | } 123 | _ => None, 124 | }) 125 | } 126 | 127 | #[test] 128 | fn server_url_builder() { 129 | with_server(|server| { 130 | let url = server.url("/definition"); 131 | assert!(url.starts_with("http://")); 132 | assert!(url.ends_with("/definition")); 133 | }); 134 | } 135 | -------------------------------------------------------------------------------- /src/http/definition.rs: -------------------------------------------------------------------------------- 1 | use iron::mime::Mime; 2 | use iron::prelude::*; 3 | use iron::status; 4 | 5 | use serde_json::to_string; 6 | 7 | use super::EngineProvider; 8 | use crate::engine::{Buffer, Context, CursorPosition, Definition}; 9 | 10 | /// Given a location, return where the identifier is defined 11 | /// 12 | /// Possible responses include 13 | /// 14 | /// - `200 OK` the request was successful and a JSON object is returned. 15 | /// - `204 No Content` the request was successful, but no match was found. 16 | /// - `400 Bad Request` the request payload was malformed 17 | /// - `500 Internal Server Error` some unexpected error occurred 18 | pub fn find(req: &mut Request) -> IronResult { 19 | // Parse the request. If the request doesn't parse properly, the request is invalid, and a 400 20 | // BadRequest is returned. 21 | let fdr = match req.get::<::bodyparser::Struct>() { 22 | Ok(Some(s)) => { 23 | trace!("definition::find parsed FindDefinitionRequest"); 24 | s 25 | } 26 | Ok(None) => { 27 | trace!("definition::find failed parsing FindDefinitionRequest"); 28 | return Ok(Response::with(status::BadRequest)); 29 | } 30 | Err(err) => { 31 | trace!("definition::find received error while parsing FindDefinitionRequest"); 32 | return Err(IronError::new(err, status::InternalServerError)); 33 | } 34 | }; 35 | 36 | let mutex = req.get::<::persistent::Write>().unwrap(); 37 | let engine = mutex.lock().unwrap_or_else(|e| e.into_inner()); 38 | match engine.find_definition(&fdr.context()) { 39 | // 200 OK; found the definition 40 | Ok(Some(definition)) => { 41 | trace!("definition::find got a match"); 42 | let res = FindDefinitionResponse::from(definition); 43 | let content_type = "application/json".parse::().unwrap(); 44 | Ok(Response::with(( 45 | content_type, 46 | status::Ok, 47 | to_string(&res).unwrap(), 48 | ))) 49 | } 50 | 51 | // 204 No Content; Everything went ok, but the definition was not found. 52 | Ok(None) => { 53 | trace!("definition::find did not find a match"); 54 | Ok(Response::with(status::NoContent)) 55 | } 56 | 57 | // 500 Internal Server Error; Error occurred while searching for the definition 58 | Err(err) => { 59 | trace!("definition::find encountered an error"); 60 | Err(IronError::new(err, status::InternalServerError)) 61 | } 62 | } 63 | } 64 | 65 | impl From for FindDefinitionResponse { 66 | fn from(def: Definition) -> FindDefinitionResponse { 67 | FindDefinitionResponse { 68 | file_path: def.file_path, 69 | column: def.position.col, 70 | line: def.position.line, 71 | text: def.text, 72 | context: def.text_context, 73 | kind: def.dtype, 74 | docs: def.docs, 75 | } 76 | } 77 | } 78 | 79 | #[derive(Debug, Deserialize, Clone)] 80 | struct FindDefinitionRequest { 81 | pub buffers: Vec, 82 | pub file_path: String, 83 | pub column: usize, 84 | pub line: usize, 85 | } 86 | 87 | impl FindDefinitionRequest { 88 | pub fn context(self) -> Context { 89 | let cursor = CursorPosition { 90 | line: self.line, 91 | col: self.column, 92 | }; 93 | Context::new(self.buffers, cursor, self.file_path) 94 | } 95 | } 96 | 97 | #[test] 98 | fn find_definition_request_from_json() { 99 | let s = stringify!({ 100 | "file_path": "src.rs", 101 | "buffers": [{ 102 | "file_path": "src.rs", 103 | "contents": "fn foo() {}\nfn bar() {}\nfn main() {\nfoo();\n}" 104 | }], 105 | "line": 4, 106 | "column": 3 107 | }); 108 | 109 | let req: FindDefinitionRequest = serde_json::from_str(s).unwrap(); 110 | assert_eq!(req.file_path, "src.rs"); 111 | assert_eq!(req.line, 4); 112 | assert_eq!(req.column, 3); 113 | } 114 | 115 | #[derive(Debug, Deserialize, Serialize)] 116 | struct FindDefinitionResponse { 117 | pub file_path: String, 118 | pub column: usize, 119 | pub line: usize, 120 | pub text: String, 121 | pub context: String, 122 | pub kind: String, 123 | pub docs: String, 124 | } 125 | -------------------------------------------------------------------------------- /src/http/mod.rs: -------------------------------------------------------------------------------- 1 | //! http server for semantic engines 2 | 3 | use iron::prelude::*; 4 | 5 | use crate::Config; 6 | 7 | mod completion; 8 | mod definition; 9 | mod file; 10 | mod ping; 11 | 12 | use crate::engine::SemanticEngine; 13 | 14 | use iron::typemap::Key; 15 | use iron_hmac::Hmac256Authentication; 16 | use iron_hmac::SecretKey; 17 | use std::sync::{Arc, Mutex}; 18 | 19 | /// Errors occurring in the http module 20 | #[derive(Debug)] 21 | pub enum Error { 22 | /// Error occurred in underlying http server lib 23 | HttpServer(iron::error::HttpError), 24 | } 25 | 26 | impl From for Error { 27 | fn from(err: iron::error::HttpError) -> Error { 28 | Error::HttpServer(err) 29 | } 30 | } 31 | 32 | pub type Result = std::result::Result; 33 | 34 | // ------------------------------------------------------------------------------------------------- 35 | /// Iron middleware responsible for attaching a semantic engine to each request 36 | #[derive(Debug, Clone)] 37 | pub struct EngineProvider; 38 | 39 | impl Key for EngineProvider { 40 | type Value = Box; 41 | } 42 | 43 | // ------------------------------------------------------------------------------------------------- 44 | 45 | /// Start the http server using the given configuration 46 | /// 47 | /// `serve` is non-blocking. 48 | /// 49 | /// # Example 50 | /// 51 | /// ```no_run 52 | /// # use libracerd::{Config}; 53 | /// let mut cfg = Config::new(); 54 | /// cfg.port = 3000; 55 | /// 56 | /// let engine = libracerd::engine::Racer::new(); 57 | /// 58 | /// let mut server = libracerd::http::serve(&cfg, engine).unwrap(); 59 | /// // ... later 60 | /// server.close().unwrap(); 61 | /// ``` 62 | /// 63 | pub fn serve( 64 | config: &Config, 65 | engine: E, 66 | ) -> Result { 67 | use logger::Format; 68 | use logger::Logger; 69 | use persistent::{Read, Write}; 70 | 71 | let mut chain = Chain::new(router!( 72 | parse: post "/parse_file" => file::parse, 73 | find: post "/find_definition" => definition::find, 74 | list: post "/list_completions" => completion::list, 75 | ping: get "/ping" => ping::pong)); 76 | 77 | // Logging middleware 78 | let log_fmt = Format::new("{method} {uri} -> {status} ({response-time})"); 79 | let (log_before, log_after) = Logger::new(log_fmt); 80 | 81 | // log_before must be first middleware in before chain 82 | if config.print_http_logs { 83 | chain.link_before(log_before); 84 | } 85 | 86 | // Get HMAC Middleware 87 | let (hmac_before, hmac_after) = if config.secret_file.is_some() { 88 | let secret = SecretKey::new(&config.read_secret_file()); 89 | let hmac_header = "x-racerd-hmac"; 90 | let (before, after) = Hmac256Authentication::middleware(secret, hmac_header); 91 | (Some(before), Some(after)) 92 | } else { 93 | (None, None) 94 | }; 95 | 96 | // This middleware provides a semantic engine to the request handlers 97 | // where Box: PersistentInto>>> 98 | let x: Arc>> = 99 | Arc::new(Mutex::new(Box::new(engine))); 100 | chain.link_before(Write::::one(x)); 101 | 102 | // Body parser middlerware 103 | chain.link_before(Read::<::bodyparser::MaxBodyLength>::one(1024 * 1024 * 10)); 104 | 105 | // Maybe link hmac middleware 106 | if let Some(hmac) = hmac_before { 107 | chain.link_before(hmac); 108 | } 109 | 110 | if let Some(hmac) = hmac_after { 111 | chain.link_after(hmac); 112 | } 113 | 114 | // log_after must be last middleware in after chain 115 | if config.print_http_logs { 116 | chain.link_after(log_after); 117 | } 118 | 119 | let app = Iron::new(chain); 120 | 121 | Ok(Server { 122 | inner: app.http((&config.addr[..], config.port))?, 123 | }) 124 | } 125 | 126 | /// Wrapper type with information and control of the underlying HTTP server 127 | /// 128 | /// This type can only be created via the [`serve`](fn.serve.html) function. 129 | #[derive(Debug)] 130 | pub struct Server { 131 | inner: iron::Listening, 132 | } 133 | 134 | impl Server { 135 | /// Stop accepting connections 136 | pub fn close(&mut self) -> Result<()> { 137 | self.inner.close().map_err(|e| e.into()) 138 | } 139 | 140 | /// Get listening address of server (eg. "127.0.0.1:59369") 141 | /// 142 | /// # Example 143 | /// ```no_run 144 | /// let mut config = ::libracerd::Config::new(); 145 | /// config.port = 3000; 146 | /// 147 | /// let engine = ::libracerd::engine::Racer::new(); 148 | /// let server = ::libracerd::http::serve(&config, engine).unwrap(); 149 | /// 150 | /// assert_eq!(server.addr(), "0.0.0.0:3000"); 151 | /// ``` 152 | pub fn addr(&self) -> String { 153 | format!("{}", self.inner.socket) 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /docs/API.md: -------------------------------------------------------------------------------- 1 | HTTP/JSON API 2 | ============= 3 | 4 | The example responses throughout this document were generated with a 5 | `--rust-src-path` value of `/Users/jwilm/rs/std/stable`. Copy and paste cURL 6 | invocations are given throughout. If you wish to run them, start a racerd server 7 | using the following command. 8 | 9 | ```bash 10 | racerd serve -l -p56773 --rust-src-path 11 | ``` 12 | 13 | ## Overview 14 | 15 | [`POST /find_definition`](#post-find_definition) attempts to find the definition 16 | of the item under the cursor. 17 | 18 | [`POST /list_completions`](#post-list_completions) attempts to generate a list of 19 | completions given the item under the cursor. 20 | 21 | [`GET /ping`](#get-ping) is a status endpoint indicating whether the server is 22 | available. 23 | 24 | ### Success 25 | 26 | The `/ping` endpoint should always return a `200 Ok` response. The semantic 27 | analysis endpoints return either `200 Ok` or `204 No Content` in the case of a 28 | successful request. A `204` response indicates that the operation completed 29 | successfully, but no definition or completion was found. 30 | 31 | ### Failure 32 | 33 | Other possible responses include `403 Forbidden` if using HMAC auth and 34 | providing an invalid HMAC, `400 Bad Request` if your request data is malformed, 35 | and `500 Internal Server Error` if anything else goes wrong. 36 | 37 | ## Authentication 38 | 39 | The server may be started with HMAC authentication. To query the server when 40 | HMAC is enabled, you must add an `x-racerd-hmac` header to your request. The 41 | value can be computed with the formula 42 | 43 | `hmac(secret, hmac(secret, method) + hmac(secret, path) + hmac(secret, body))` 44 | 45 | where `hmac()` is an SHA-256 HMAC routine. 46 | 47 | An important note is that the final output should be hex-encoded but the steps 48 | in between should not. 49 | 50 | A correct implementation can be found at https://github.com/jwilm/racerd/blob/master/tests/util/mod.rs#L26 51 | 52 | ## Common types 53 | 54 | ### Buffer 55 | 56 | A buffer is a potentially in memory representation of a file. Racerd supports 57 | specifying a list of buffers with each [QueryRequest][] to use instead of 58 | reading those files from disk. 59 | 60 | | Field | Type | Meaning | 61 | |-----------|--------|--------------------------------------| 62 | | file_path | string | File path to associate with contents | 63 | | contents | string | Contents to use for given file_path | 64 | 65 | ### QueryRequest 66 | 67 | The `QueryRequest` type is used by both the [find definition][] and 68 | [list completions][] endpoints. 69 | 70 | | Field | Type | Meaning | 71 | |-----------|-------------------|-----------------------------------------------------------------------------------------------| 72 | | file_path | string | File path for query context | 73 | | buffers | Array<[Buffer][]> | List of buffers to use instead of loading from disk. Files omitted here are loaded from disk. | 74 | | line | number | Cursor line for query context | 75 | | column | number | Cursor column for query context | 76 | 77 | 78 | ## POST /list_completions 79 | 80 | `POST /list_completions` accepts the [QueryRequest][] request type. 81 | 82 | ### cURL Command 83 | 84 | ```bash 85 | curl -H "Content-Type: application/json" -d '{"buffers":[{"file_path":"src.rs","contents":"use std::path;\nfn main() {\nlet p = path::Path::\n}\n"}],"file_path":"src.rs","line":3,"column":20}' 127.0.0.1:56773/list_completions 86 | ``` 87 | 88 | ### Request 89 | 90 | ```json 91 | { 92 | "buffers":[ 93 | { 94 | "file_path":"src.rs", 95 | "contents":"use std::path;\nfn main() {\nlet p = path::Path::\n}\n" 96 | } 97 | ], 98 | "file_path":"src.rs", 99 | "line":3, 100 | "column":20 101 | } 102 | ``` 103 | 104 | ### Response 105 | 106 | The response for `/list_completions` is an array of completion data objects. 107 | 108 | | Field | Type | Meaning | 109 | |-----------|--------|---------------------------------------| 110 | | file_path | string | Path to file where completion found | 111 | | line | number | Line in file where completion found | 112 | | column | number | Column in file where completion found | 113 | | text | string | Text of completion | 114 | | context | string | Surrounding text of completion | 115 | | kind | string | Type of completion | 116 | 117 | ``` 118 | [ 119 | { 120 | "text":"new", 121 | "context":"pub fn new + ?Sized>(s: &S) -> &Path {", 122 | "kind":"Function", 123 | "file_path":"/Users/jwilm/rs/std/stable/libstd/path.rs", 124 | "line":1267, 125 | "column":11 126 | } 127 | ] 128 | ``` 129 | 130 | ## POST /find_definition 131 | 132 | `POST /find_definition` accepts the [QueryRequest][] request type. 133 | 134 | ### cURL Command 135 | 136 | ```bash 137 | curl -H "Content-Type: application/json" -d '{"buffers":[{"file_path":"src.rs","contents":"use std::path::Path;\nfn main() {\nlet p = &Path::new(\"test\")\n}\n"}],"file_path":"src.rs","line":3,"column":16}' 127.0.0.1:56773/find_definition 138 | ``` 139 | 140 | ### Request 141 | 142 | ```json 143 | { 144 | "buffers":[ 145 | { 146 | "file_path":"src.rs", 147 | "contents":"use std::path::Path;\nfn main() {\nlet p = &Path::new(\"test\")\n}\n" 148 | } 149 | ], 150 | "file_path":"src.rs", 151 | "line":3, 152 | "column":16 153 | } 154 | ``` 155 | 156 | ### Response 157 | 158 | | Field | Type | Meaning | 159 | |-----------|--------|--------------------------------------------| 160 | | file_path | string | Path to file in which definition was found | 161 | | text | string | Text of found definition | 162 | | line | number | Line in file where definition was found | 163 | | column | number | Column in file where definition was found | 164 | | context | string | Surrounding text of definition | 165 | | kind | string | Type of definition | 166 | 167 | ```json 168 | { 169 | "file_path":"/Users/jwilm/rs/std/stable/libstd/path.rs", 170 | "column":11, 171 | "line":1267, 172 | "text":"new", 173 | "context":"pub fn new + ?Sized>(s: &S) -> &Path {", 174 | "kind":"Function" 175 | } 176 | ``` 177 | 178 | 179 | ## GET /ping 180 | 181 | The `GET /ping` endpoint is used as a status check for the server. It will 182 | always return the same response regardless of what is sent in the body. 183 | 184 | ### cURL Command 185 | 186 | ```bash 187 | curl 127.0.0.1:56773/ping 188 | ``` 189 | 190 | ### Response 191 | 192 | ```json 193 | { 194 | "pong": true 195 | } 196 | ``` 197 | 198 | [QueryRequest]: #queryrequest 199 | [Buffer]: #buffer 200 | [find definition]: #post-find_definition 201 | [list completions]: #post-list_completions 202 | -------------------------------------------------------------------------------- /src/engine/my_racer.rs: -------------------------------------------------------------------------------- 1 | //! SemanticEngine implementation for [the racer library](https://github.com/phildawes/racer) 2 | //! 3 | use crate::engine::{Completion, Context, CursorPosition, Definition, SemanticEngine}; 4 | 5 | use racer::{self, Coordinate, FileCache, Match, Session}; 6 | 7 | use std::sync::Mutex; 8 | 9 | use regex::Regex; 10 | 11 | pub struct Racer { 12 | cache: Mutex, 13 | } 14 | 15 | impl Racer { 16 | pub fn new() -> Racer { 17 | Racer { 18 | cache: Mutex::new(FileCache::default()), 19 | } 20 | } 21 | } 22 | 23 | // Racer's FileCache uses Rc and RefCell internally. We wrap everything in a 24 | // Mutex, and the Rcs aren't possible to leak, so these should be ok. Correct 25 | // solution is to make racer threadsafe. 26 | unsafe impl Sync for Racer {} 27 | unsafe impl Send for Racer {} 28 | 29 | use super::Result; 30 | use crate::Config; 31 | 32 | impl SemanticEngine for Racer { 33 | fn initialize(&self, config: &Config) -> Result<()> { 34 | if let Some(ref src_path) = config.rust_src_path { 35 | std::env::set_var("RUST_SRC_PATH", src_path); 36 | } 37 | 38 | Ok(()) 39 | } 40 | 41 | fn find_definition(&self, ctx: &Context) -> Result> { 42 | let cache = match self.cache.lock() { 43 | Ok(guard) => guard, 44 | Err(poisoned) => poisoned.into_inner(), 45 | }; 46 | 47 | let session = Session::new(&cache, Some(ctx.query_path())); 48 | for buffer in &ctx.buffers { 49 | session.cache_file_contents(buffer.path(), &*buffer.contents) 50 | } 51 | 52 | // TODO catch_panic: apparently this can panic! in a string operation. Something about pos 53 | // not landing on a character boundary. 54 | Ok( 55 | racer::find_definition(ctx.query_path(), ctx.query_cursor, &session).and_then(|m| { 56 | m.coords.map(|Coordinate { row, col }| Definition { 57 | position: CursorPosition { 58 | line: row.0 as usize, 59 | col: col.0 as usize, 60 | }, 61 | dtype: format!("{:?}", m.mtype), 62 | file_path: m.filepath.to_str().unwrap().to_string(), 63 | text: m.matchstr.clone(), 64 | text_context: m.contextstr.clone(), 65 | docs: m.docs.clone(), 66 | }) 67 | }), 68 | ) 69 | } 70 | 71 | fn list_completions(&self, ctx: &Context) -> Result>> { 72 | let cache = match self.cache.lock() { 73 | Ok(guard) => guard, 74 | Err(poisoned) => poisoned.into_inner(), 75 | }; 76 | 77 | let session = Session::new(&cache, Some(ctx.query_path())); 78 | for buffer in &ctx.buffers { 79 | session.cache_file_contents(buffer.path(), &*buffer.contents) 80 | } 81 | 82 | let completions = racer::complete_from_file(ctx.query_path(), ctx.query_cursor, &session) 83 | .filter_map( 84 | |Match { 85 | matchstr, 86 | contextstr, 87 | mtype, 88 | filepath, 89 | coords, 90 | .. 91 | }| { 92 | coords.map(|Coordinate { row, col }| Completion { 93 | position: CursorPosition { 94 | line: row.0 as usize, 95 | col: col.0 as usize, 96 | }, 97 | text: matchstr, 98 | context: collapse_whitespace(&contextstr), 99 | kind: format!("{:?}", mtype), 100 | file_path: filepath.to_str().unwrap().to_string(), 101 | }) 102 | }, 103 | ) 104 | .collect::>(); 105 | 106 | if !completions.is_empty() { 107 | Ok(Some(completions)) 108 | } else { 109 | Ok(None) 110 | } 111 | } 112 | } 113 | 114 | pub fn collapse_whitespace(text: &str) -> String { 115 | Regex::new(r"\s+") 116 | .unwrap() 117 | .replace_all(text, " ") 118 | .to_string() 119 | } 120 | 121 | #[cfg(test)] 122 | mod tests { 123 | use super::*; 124 | use crate::engine::{Buffer, Context, CursorPosition, SemanticEngine}; 125 | 126 | use crate::util::fs::TmpFile; 127 | 128 | #[test] 129 | #[allow(unused_variables)] 130 | fn find_definition() { 131 | // FIXME this is just here for side effects. 132 | let src2 = TmpFile::with_name( 133 | "src2.rs", 134 | " 135 | /// myfn docs 136 | pub fn myfn() {} 137 | pub fn foo() {} 138 | ", 139 | ); 140 | 141 | let src = " 142 | use src2::*; 143 | mod src2; 144 | fn main() { 145 | myfn(); 146 | }"; 147 | 148 | let buffers = vec![Buffer { 149 | contents: src.to_string(), 150 | file_path: "src.rs".to_string(), 151 | }]; 152 | 153 | let ctx = Context::new(buffers, CursorPosition { line: 5, col: 17 }, "src.rs"); 154 | let racer = Racer::new(); 155 | let def = racer.find_definition(&ctx).unwrap().unwrap(); 156 | 157 | assert_eq!(def.text, "myfn"); 158 | assert_eq!(def.docs, "myfn docs"); 159 | } 160 | 161 | #[test] 162 | #[allow(unused_variables)] 163 | fn find_completion() { 164 | let src = " 165 | mod mymod { 166 | /// myfn is a thing 167 | pub fn myfn(reader: T) where T: ::std::io::Read {} 168 | } 169 | 170 | fn main() { 171 | mymod::my 172 | }"; 173 | 174 | let buffers = vec![Buffer { 175 | contents: src.to_string(), 176 | file_path: "src.rs".to_string(), 177 | }]; 178 | 179 | let ctx = Context::new(buffers, CursorPosition { line: 8, col: 25 }, "src.rs"); 180 | let racer = Racer::new(); 181 | 182 | let completions = racer.list_completions(&ctx).unwrap().unwrap(); 183 | assert_eq!(completions.len(), 1); 184 | 185 | let completion = &completions[0]; 186 | assert_eq!(completion.text, "myfn"); 187 | assert_eq!(completion.position.line, 4); 188 | assert_eq!(completion.file_path, "src.rs"); 189 | } 190 | 191 | #[test] 192 | fn find_completion_collapsing_whitespace() { 193 | let src = " 194 | struct foo {} 195 | 196 | impl foo { 197 | fn format( &self ) 198 | -> u32 { 199 | } 200 | } 201 | 202 | fn main() { 203 | let x = foo{}; 204 | x. 205 | }"; 206 | 207 | let buffers = vec![Buffer { 208 | contents: src.to_string(), 209 | file_path: "src.rs".to_string(), 210 | }]; 211 | 212 | let ctx = Context::new(buffers, CursorPosition { line: 12, col: 16 }, "src.rs"); 213 | let racer = Racer::new(); 214 | 215 | let completions = racer.list_completions(&ctx).unwrap().unwrap(); 216 | assert_eq!(completions.len(), 1); 217 | 218 | let completion = &completions[0]; 219 | assert_eq!(completion.context, "fn format( &self ) -> u32"); 220 | } 221 | 222 | #[test] 223 | fn collapse_whitespace_test() { 224 | assert_eq!(collapse_whitespace("foo foo"), "foo foo"); 225 | assert_eq!(collapse_whitespace(" "), " "); 226 | assert_eq!(collapse_whitespace("\n\t \n"), " "); 227 | assert_eq!(collapse_whitespace("foo\nbar"), "foo bar"); 228 | assert_eq!( 229 | collapse_whitespace("fn foo( &self )\n -> u32"), 230 | "fn foo( &self ) -> u32" 231 | ); 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /tests/lib.rs: -------------------------------------------------------------------------------- 1 | #![deny(warnings)] 2 | 3 | extern crate libracerd; 4 | extern crate rustc_serialize; 5 | 6 | #[macro_use] 7 | extern crate hyper; 8 | 9 | extern crate crypto; 10 | 11 | mod util; 12 | 13 | /// Although the value is not used, running env! for RUST_SRC_PATH checks, before running the tests, 14 | /// that the required environment variable is defined. 15 | const _RUST_SRC_PATH: &'static str = env!("RUST_SRC_PATH"); 16 | 17 | macro_rules! init_logging { 18 | () => {}; 19 | } 20 | 21 | #[test] 22 | #[should_panic] 23 | #[cfg(not(windows))] 24 | fn panics_when_invalid_secret_given() { 25 | use libracerd::engine::{Racer, SemanticEngine}; 26 | use libracerd::http::serve; 27 | use libracerd::Config; 28 | 29 | init_logging!(); 30 | 31 | let config = Config { 32 | secret_file: Some("a.file.that.does.not.exist".to_owned()), 33 | print_http_logs: true, 34 | ..Default::default() 35 | }; 36 | 37 | let engine = Racer::new(); 38 | engine.initialize(&config).unwrap(); 39 | serve(&config, engine).unwrap(); 40 | } 41 | 42 | mod http { 43 | use hyper::header::ContentType; 44 | use hyper::Client; 45 | 46 | use std::io::Read; 47 | 48 | header! { (XRacerdHmac, "x-racerd-hmac") => [String] } 49 | 50 | use crate::util::http::{self, request_str, UrlBuilder}; 51 | 52 | use libracerd::util::fs::TmpFile; 53 | use rustc_serialize::json::Json; 54 | 55 | use hyper::method::Method; 56 | 57 | /// Checks that /find_definition works within a single buffer 58 | #[test] 59 | fn find_definition() { 60 | init_logging!(); 61 | http::with_server(|server| { 62 | // Build request args 63 | let url = server.url("/find_definition"); 64 | let request_obj = stringify!({ 65 | "buffers": [{ 66 | "file_path": "src.rs", 67 | "contents": "fn foo() {}\nfn bar() {}\nfn main() {\nfoo();\n}" 68 | }], 69 | "file_path": "src.rs", 70 | "line": 4, 71 | "column": 3 72 | }); 73 | 74 | // Make request 75 | let res = request_str(Method::Post, &url[..], Some(request_obj)) 76 | .unwrap() 77 | .unwrap(); 78 | 79 | // Build actual/expected objects 80 | let actual = Json::from_str(&res[..]).unwrap(); 81 | let expected = Json::from_str(stringify!({ 82 | "text": "foo", 83 | "line": 1, 84 | "column": 3, 85 | "file_path": "src.rs", 86 | "context": "fn foo()", 87 | "kind": "Function", 88 | "docs": "" 89 | })) 90 | .unwrap(); 91 | 92 | // They should be equal 93 | assert_eq!(actual, expected); 94 | }); 95 | } 96 | 97 | /// Checks that /find_definition correctly resolves cross file definitions when the buffers have 98 | /// not been written to disk. 99 | #[test] 100 | fn find_definition_multiple_dirty_buffers() { 101 | init_logging!(); 102 | // Build request args 103 | let request_obj = stringify!({ 104 | "buffers": [{ 105 | "file_path": "src.rs", 106 | "contents": "mod src2;\nuse src2::{foo,myfn};\nfn main() {\n myfn();\n}\n" 107 | }, { 108 | "file_path": "src2.rs", 109 | "contents": "\npub fn myfn()\npub fn foo() {}\n" 110 | }], 111 | "file_path": "src.rs", 112 | "line": 4, 113 | "column": 7 114 | }); 115 | 116 | // Create an *empty* temporary file. The request contains unsaved file contents. For rust 117 | // module inclusions to work, the compiler checks certain locations on the file system where 118 | // a module file could be located. It simply doesn't work with unnamed files. 119 | let _f = TmpFile::with_name("src2.rs", ""); 120 | 121 | http::with_server(|server| { 122 | // Make request 123 | let url = server.url("/find_definition"); 124 | let res = request_str(Method::Post, &url[..], Some(request_obj)) 125 | .unwrap() 126 | .unwrap(); 127 | 128 | // Build actual/expected objects 129 | let actual = Json::from_str(&res[..]).unwrap(); 130 | let expected = Json::from_str(stringify!({ 131 | "text": "myfn", 132 | "line": 2, 133 | "column": 7, 134 | "file_path": "src2.rs", 135 | "context": "pub fn myfn() pub fn foo()", 136 | "kind": "Function", 137 | "docs": "" 138 | })) 139 | .unwrap(); 140 | 141 | // They should be equal 142 | assert_eq!(actual, expected); 143 | }); 144 | } 145 | 146 | macro_rules! assert_str_prop_on_obj_in_list { 147 | ($prop:expr, $val:expr, $list:expr) => { 148 | assert!($list.as_array().unwrap().iter().any(|c| { 149 | $val == c 150 | .as_object() 151 | .unwrap() 152 | .get($prop) 153 | .unwrap() 154 | .as_string() 155 | .unwrap() 156 | })); 157 | }; 158 | } 159 | 160 | #[test] 161 | fn find_definition_in_std_library() { 162 | init_logging!(); 163 | // Build request args 164 | let request_obj = stringify!({ 165 | "buffers": [{ 166 | "file_path": "src.rs", 167 | "contents": "use std::borrow::Cow;\nfn main() {\nlet p = Cow::Borrowed(\"arst\");\n}\n" 168 | }], 169 | "file_path": "src.rs", 170 | "line": 3, 171 | "column": 17 172 | }); 173 | 174 | http::with_server(|server| { 175 | // Make request 176 | let url = server.url("/find_definition"); 177 | let res = request_str(Method::Post, &url[..], Some(request_obj)) 178 | .unwrap() 179 | .unwrap(); 180 | 181 | // Build actual/expected objects 182 | let actual = Json::from_str(&res[..]).expect("response is json"); 183 | 184 | // We don't know exactly how the result is going to look in this case. 185 | let obj = actual.as_object().unwrap(); 186 | 187 | // Check that `file_path` ends_with "path.rs" 188 | let found_path = obj.get("file_path").unwrap().as_string().unwrap(); 189 | assert!(found_path.ends_with("borrow.rs")); 190 | 191 | // Check that we found a thing called "new" 192 | let found_text = obj.get("text").unwrap().as_string().unwrap(); 193 | assert_eq!(found_text, "Borrowed"); 194 | }); 195 | } 196 | 197 | #[test] 198 | fn list_path_completions_std_library() { 199 | use rustc_serialize::json; 200 | init_logging!(); 201 | 202 | // Build request args 203 | let request_obj = stringify!({ 204 | "buffers": [{ 205 | "file_path": "src.rs", 206 | "contents": "use std::path;\nfn main() {\nlet p = &path::\n}\n" 207 | }], 208 | "file_path": "src.rs", 209 | "line": 3, 210 | "column": 15 211 | }); 212 | 213 | http::with_server(|server| { 214 | // Make request 215 | let url = server.url("/list_completions"); 216 | let res = request_str(Method::Post, &url[..], Some(request_obj)) 217 | .unwrap() 218 | .unwrap(); 219 | 220 | let list = Json::from_str(&res[..]).unwrap(); 221 | 222 | println!("{}", json::as_pretty_json(&list)); 223 | 224 | // Check that the "Path" completion is available 225 | assert_str_prop_on_obj_in_list!("text", "Path", list); 226 | assert_str_prop_on_obj_in_list!("text", "PathBuf", list); 227 | }); 228 | } 229 | 230 | #[test] 231 | fn ping_pong() { 232 | init_logging!(); 233 | http::with_server(|server| { 234 | let url = server.url("/ping"); 235 | let res = request_str(Method::Get, &url[..], None).unwrap().unwrap(); 236 | let actual = Json::from_str(&res[..]).unwrap(); 237 | 238 | let expected = Json::from_str(stringify!({ 239 | "pong": true 240 | })) 241 | .unwrap(); 242 | 243 | assert_eq!(actual, expected); 244 | }); 245 | } 246 | 247 | #[test] 248 | fn ping_pong_hmac_with_correct_secret() { 249 | init_logging!(); 250 | let secret = "hello hmac ping pong"; 251 | 252 | http::with_hmac_server(secret, |server| { 253 | // The request hmac in this case should be 254 | let hmac = crate::util::request_hmac(secret, "GET", "/ping", ""); 255 | 256 | let url = server.url("/ping"); 257 | 258 | let client = Client::new(); 259 | let mut res = client 260 | .get(&url[..]) 261 | .header(XRacerdHmac(hmac)) 262 | .header(ContentType::json()) 263 | .send() 264 | .unwrap(); 265 | 266 | assert_eq!(res.status, ::hyper::status::StatusCode::Ok); 267 | 268 | let mut body = String::new(); 269 | res.read_to_string(&mut body).unwrap(); 270 | 271 | let actual = Json::from_str(&body[..]).unwrap(); 272 | let expected = Json::from_str(stringify!({ 273 | "pong": true 274 | })) 275 | .unwrap(); 276 | 277 | assert_eq!(actual, expected); 278 | }); 279 | } 280 | 281 | #[test] 282 | fn ping_pong_hmac_wrong_secret() { 283 | init_logging!(); 284 | let secret = "hello hmac ping pong"; 285 | 286 | http::with_hmac_server(secret, |server| { 287 | // The request hmac in this case should be 288 | let hmac = crate::util::request_hmac("different secret", "GET", "/ping", ""); 289 | 290 | let url = server.url("/ping"); 291 | 292 | let client = Client::new(); 293 | let res = client 294 | .get(&url[..]) 295 | .header(XRacerdHmac(hmac)) 296 | .header(ContentType::json()) 297 | .send() 298 | .unwrap(); 299 | 300 | assert_eq!(res.status, ::hyper::status::StatusCode::Forbidden); 301 | }); 302 | } 303 | } 304 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.7.6" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "annotate-snippets" 13 | version = "0.6.1" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | 16 | [[package]] 17 | name = "ansi_term" 18 | version = "0.11.0" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | dependencies = [ 21 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 22 | ] 23 | 24 | [[package]] 25 | name = "arrayvec" 26 | version = "0.4.11" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | dependencies = [ 29 | "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 30 | ] 31 | 32 | [[package]] 33 | name = "atty" 34 | version = "0.2.13" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | dependencies = [ 37 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 38 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 39 | ] 40 | 41 | [[package]] 42 | name = "autocfg" 43 | version = "0.1.5" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | 46 | [[package]] 47 | name = "base64" 48 | version = "0.9.3" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | dependencies = [ 51 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 52 | "safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 53 | ] 54 | 55 | [[package]] 56 | name = "bitflags" 57 | version = "1.1.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | 60 | [[package]] 61 | name = "bodyparser" 62 | version = "0.8.0" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | dependencies = [ 65 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 66 | "persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 67 | "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 68 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", 70 | ] 71 | 72 | [[package]] 73 | name = "byteorder" 74 | version = "1.3.2" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | 77 | [[package]] 78 | name = "c2-chacha" 79 | version = "0.2.2" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | dependencies = [ 82 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 83 | "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", 84 | ] 85 | 86 | [[package]] 87 | name = "cfg-if" 88 | version = "0.1.9" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | 91 | [[package]] 92 | name = "clap" 93 | version = "2.33.0" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | dependencies = [ 96 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 97 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 98 | "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 99 | "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 100 | "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 103 | ] 104 | 105 | [[package]] 106 | name = "cloudabi" 107 | version = "0.0.3" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | dependencies = [ 110 | "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 111 | ] 112 | 113 | [[package]] 114 | name = "constant_time_eq" 115 | version = "0.1.3" 116 | source = "registry+https://github.com/rust-lang/crates.io-index" 117 | 118 | [[package]] 119 | name = "crossbeam-deque" 120 | version = "0.2.0" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | dependencies = [ 123 | "crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 124 | "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 125 | ] 126 | 127 | [[package]] 128 | name = "crossbeam-epoch" 129 | version = "0.3.1" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | dependencies = [ 132 | "arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 133 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 134 | "crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 135 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 136 | "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 137 | "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 138 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 139 | ] 140 | 141 | [[package]] 142 | name = "crossbeam-utils" 143 | version = "0.2.2" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | dependencies = [ 146 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 147 | ] 148 | 149 | [[package]] 150 | name = "crossbeam-utils" 151 | version = "0.6.6" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | dependencies = [ 154 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 155 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 156 | ] 157 | 158 | [[package]] 159 | name = "derive_more" 160 | version = "0.13.0" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | dependencies = [ 163 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 164 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 165 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 166 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 167 | ] 168 | 169 | [[package]] 170 | name = "docopt" 171 | version = "1.1.0" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | dependencies = [ 174 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", 178 | ] 179 | 180 | [[package]] 181 | name = "either" 182 | version = "1.5.2" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | 185 | [[package]] 186 | name = "ena" 187 | version = "0.13.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | dependencies = [ 190 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 191 | ] 192 | 193 | [[package]] 194 | name = "env_logger" 195 | version = "0.5.13" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | dependencies = [ 198 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 199 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 200 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 201 | "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 202 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 203 | ] 204 | 205 | [[package]] 206 | name = "env_logger" 207 | version = "0.6.2" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | dependencies = [ 210 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 212 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 215 | ] 216 | 217 | [[package]] 218 | name = "fuchsia-cprng" 219 | version = "0.1.1" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | 222 | [[package]] 223 | name = "gcc" 224 | version = "0.3.55" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | 227 | [[package]] 228 | name = "getrandom" 229 | version = "0.1.10" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | dependencies = [ 232 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 233 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 234 | "wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 235 | ] 236 | 237 | [[package]] 238 | name = "httparse" 239 | version = "1.3.4" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | 242 | [[package]] 243 | name = "humantime" 244 | version = "1.2.0" 245 | source = "registry+https://github.com/rust-lang/crates.io-index" 246 | dependencies = [ 247 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 248 | ] 249 | 250 | [[package]] 251 | name = "hyper" 252 | version = "0.10.16" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | dependencies = [ 255 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 256 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 257 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 258 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 259 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 260 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 261 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 262 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 263 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 264 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 265 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 266 | ] 267 | 268 | [[package]] 269 | name = "idna" 270 | version = "0.1.5" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | dependencies = [ 273 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 274 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 275 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 276 | ] 277 | 278 | [[package]] 279 | name = "indexmap" 280 | version = "1.0.2" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | 283 | [[package]] 284 | name = "iron" 285 | version = "0.6.1" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | dependencies = [ 288 | "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 289 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 290 | "mime_guess 1.8.7 (registry+https://github.com/rust-lang/crates.io-index)", 291 | "modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 292 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 293 | "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 294 | "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 295 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 296 | ] 297 | 298 | [[package]] 299 | name = "iron-hmac" 300 | version = "0.6.0" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | dependencies = [ 303 | "bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 304 | "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 305 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 306 | "persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 307 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 308 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 309 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 310 | ] 311 | 312 | [[package]] 313 | name = "itertools" 314 | version = "0.8.0" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | dependencies = [ 317 | "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 318 | ] 319 | 320 | [[package]] 321 | name = "itoa" 322 | version = "0.4.4" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | 325 | [[package]] 326 | name = "jobserver" 327 | version = "0.1.16" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | dependencies = [ 330 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 331 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 332 | "rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 333 | ] 334 | 335 | [[package]] 336 | name = "language-tags" 337 | version = "0.2.2" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | 340 | [[package]] 341 | name = "lazy_static" 342 | version = "1.3.0" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | 345 | [[package]] 346 | name = "lazycell" 347 | version = "1.2.1" 348 | source = "registry+https://github.com/rust-lang/crates.io-index" 349 | 350 | [[package]] 351 | name = "libc" 352 | version = "0.2.62" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | 355 | [[package]] 356 | name = "libracerd" 357 | version = "0.3.3" 358 | dependencies = [ 359 | "bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 360 | "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 361 | "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", 362 | "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 363 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 364 | "iron-hmac 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 365 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 366 | "logger 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 367 | "persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 368 | "racer 2.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 369 | "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", 370 | "regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 371 | "rls-span 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 372 | "router 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 373 | "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)", 374 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 375 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 376 | "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 377 | "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", 378 | ] 379 | 380 | [[package]] 381 | name = "lock_api" 382 | version = "0.1.5" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | dependencies = [ 385 | "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 386 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 387 | ] 388 | 389 | [[package]] 390 | name = "log" 391 | version = "0.3.9" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | dependencies = [ 394 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 395 | ] 396 | 397 | [[package]] 398 | name = "log" 399 | version = "0.4.8" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | dependencies = [ 402 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 403 | ] 404 | 405 | [[package]] 406 | name = "logger" 407 | version = "0.4.0" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | dependencies = [ 410 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 411 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 413 | ] 414 | 415 | [[package]] 416 | name = "matches" 417 | version = "0.1.8" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | 420 | [[package]] 421 | name = "memchr" 422 | version = "2.2.1" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | 425 | [[package]] 426 | name = "memoffset" 427 | version = "0.2.1" 428 | source = "registry+https://github.com/rust-lang/crates.io-index" 429 | 430 | [[package]] 431 | name = "mime" 432 | version = "0.2.6" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | dependencies = [ 435 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 436 | ] 437 | 438 | [[package]] 439 | name = "mime_guess" 440 | version = "1.8.7" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | dependencies = [ 443 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 444 | "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 445 | "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 446 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 447 | ] 448 | 449 | [[package]] 450 | name = "modifier" 451 | version = "0.1.0" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | 454 | [[package]] 455 | name = "nodrop" 456 | version = "0.1.13" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | 459 | [[package]] 460 | name = "num_cpus" 461 | version = "1.10.1" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | dependencies = [ 464 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 465 | ] 466 | 467 | [[package]] 468 | name = "owning_ref" 469 | version = "0.4.0" 470 | source = "registry+https://github.com/rust-lang/crates.io-index" 471 | dependencies = [ 472 | "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 473 | ] 474 | 475 | [[package]] 476 | name = "parking_lot" 477 | version = "0.7.1" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | dependencies = [ 480 | "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 481 | "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 482 | ] 483 | 484 | [[package]] 485 | name = "parking_lot_core" 486 | version = "0.4.0" 487 | source = "registry+https://github.com/rust-lang/crates.io-index" 488 | dependencies = [ 489 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 490 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 491 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 492 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 493 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 494 | ] 495 | 496 | [[package]] 497 | name = "percent-encoding" 498 | version = "1.0.1" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | 501 | [[package]] 502 | name = "persistent" 503 | version = "0.4.0" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | dependencies = [ 506 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 508 | ] 509 | 510 | [[package]] 511 | name = "phf" 512 | version = "0.7.24" 513 | source = "registry+https://github.com/rust-lang/crates.io-index" 514 | dependencies = [ 515 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 516 | ] 517 | 518 | [[package]] 519 | name = "phf_codegen" 520 | version = "0.7.24" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | dependencies = [ 523 | "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 524 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 525 | ] 526 | 527 | [[package]] 528 | name = "phf_generator" 529 | version = "0.7.24" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | dependencies = [ 532 | "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", 533 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 534 | ] 535 | 536 | [[package]] 537 | name = "phf_shared" 538 | version = "0.7.24" 539 | source = "registry+https://github.com/rust-lang/crates.io-index" 540 | dependencies = [ 541 | "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 542 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 543 | ] 544 | 545 | [[package]] 546 | name = "plugin" 547 | version = "0.2.6" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | dependencies = [ 550 | "typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 551 | ] 552 | 553 | [[package]] 554 | name = "ppv-lite86" 555 | version = "0.2.5" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | 558 | [[package]] 559 | name = "proc-macro2" 560 | version = "0.4.30" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | dependencies = [ 563 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 564 | ] 565 | 566 | [[package]] 567 | name = "proc-macro2" 568 | version = "1.0.1" 569 | source = "registry+https://github.com/rust-lang/crates.io-index" 570 | dependencies = [ 571 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 572 | ] 573 | 574 | [[package]] 575 | name = "quick-error" 576 | version = "1.2.2" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | 579 | [[package]] 580 | name = "quote" 581 | version = "0.6.13" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | dependencies = [ 584 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 585 | ] 586 | 587 | [[package]] 588 | name = "quote" 589 | version = "1.0.2" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | dependencies = [ 592 | "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 593 | ] 594 | 595 | [[package]] 596 | name = "racer" 597 | version = "2.1.25" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | dependencies = [ 600 | "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 601 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", 602 | "derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", 603 | "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 604 | "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 605 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 606 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 607 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 608 | "racer-cargo-metadata 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "rls-span 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "rustc-ap-syntax 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 611 | ] 612 | 613 | [[package]] 614 | name = "racer-cargo-metadata" 615 | version = "0.1.1" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | dependencies = [ 618 | "racer-interner 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 619 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 620 | "serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)", 621 | ] 622 | 623 | [[package]] 624 | name = "racer-interner" 625 | version = "0.1.0" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | dependencies = [ 628 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 629 | ] 630 | 631 | [[package]] 632 | name = "rand" 633 | version = "0.3.23" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | dependencies = [ 636 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 637 | "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 638 | ] 639 | 640 | [[package]] 641 | name = "rand" 642 | version = "0.4.6" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | dependencies = [ 645 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 646 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 647 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 648 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 649 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 650 | ] 651 | 652 | [[package]] 653 | name = "rand" 654 | version = "0.5.6" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | dependencies = [ 657 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 658 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 659 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 660 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 661 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 662 | ] 663 | 664 | [[package]] 665 | name = "rand" 666 | version = "0.6.5" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | dependencies = [ 669 | "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 670 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 671 | "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 672 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 673 | "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 674 | "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 675 | "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 676 | "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 677 | "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 678 | "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 679 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 680 | ] 681 | 682 | [[package]] 683 | name = "rand" 684 | version = "0.7.0" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | dependencies = [ 687 | "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 688 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 689 | "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 690 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 691 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 692 | ] 693 | 694 | [[package]] 695 | name = "rand_chacha" 696 | version = "0.1.1" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | dependencies = [ 699 | "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 700 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 701 | ] 702 | 703 | [[package]] 704 | name = "rand_chacha" 705 | version = "0.2.1" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | dependencies = [ 708 | "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 709 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 710 | ] 711 | 712 | [[package]] 713 | name = "rand_core" 714 | version = "0.3.1" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | dependencies = [ 717 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 718 | ] 719 | 720 | [[package]] 721 | name = "rand_core" 722 | version = "0.4.2" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | 725 | [[package]] 726 | name = "rand_core" 727 | version = "0.5.0" 728 | source = "registry+https://github.com/rust-lang/crates.io-index" 729 | dependencies = [ 730 | "getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 731 | ] 732 | 733 | [[package]] 734 | name = "rand_hc" 735 | version = "0.1.0" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | dependencies = [ 738 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 739 | ] 740 | 741 | [[package]] 742 | name = "rand_hc" 743 | version = "0.2.0" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | dependencies = [ 746 | "rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 747 | ] 748 | 749 | [[package]] 750 | name = "rand_isaac" 751 | version = "0.1.1" 752 | source = "registry+https://github.com/rust-lang/crates.io-index" 753 | dependencies = [ 754 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 755 | ] 756 | 757 | [[package]] 758 | name = "rand_jitter" 759 | version = "0.1.4" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | dependencies = [ 762 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 763 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 764 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 765 | ] 766 | 767 | [[package]] 768 | name = "rand_os" 769 | version = "0.1.3" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | dependencies = [ 772 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 773 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 774 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 775 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 776 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 777 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 778 | ] 779 | 780 | [[package]] 781 | name = "rand_pcg" 782 | version = "0.1.2" 783 | source = "registry+https://github.com/rust-lang/crates.io-index" 784 | dependencies = [ 785 | "autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 786 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 787 | ] 788 | 789 | [[package]] 790 | name = "rand_xorshift" 791 | version = "0.1.1" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | dependencies = [ 794 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 795 | ] 796 | 797 | [[package]] 798 | name = "rdrand" 799 | version = "0.4.0" 800 | source = "registry+https://github.com/rust-lang/crates.io-index" 801 | dependencies = [ 802 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 803 | ] 804 | 805 | [[package]] 806 | name = "redox_syscall" 807 | version = "0.1.56" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | 810 | [[package]] 811 | name = "regex" 812 | version = "1.2.1" 813 | source = "registry+https://github.com/rust-lang/crates.io-index" 814 | dependencies = [ 815 | "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", 816 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 817 | "regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 819 | ] 820 | 821 | [[package]] 822 | name = "regex-syntax" 823 | version = "0.6.11" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | 826 | [[package]] 827 | name = "rls-span" 828 | version = "0.5.2" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | dependencies = [ 831 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 832 | ] 833 | 834 | [[package]] 835 | name = "route-recognizer" 836 | version = "0.1.13" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | 839 | [[package]] 840 | name = "router" 841 | version = "0.6.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | dependencies = [ 844 | "iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 845 | "route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 846 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 847 | ] 848 | 849 | [[package]] 850 | name = "rust-crypto" 851 | version = "0.2.36" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | dependencies = [ 854 | "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", 855 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 856 | "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", 857 | "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", 858 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 859 | ] 860 | 861 | [[package]] 862 | name = "rustc-ap-arena" 863 | version = "546.0.0" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | dependencies = [ 866 | "rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 867 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 868 | ] 869 | 870 | [[package]] 871 | name = "rustc-ap-graphviz" 872 | version = "546.0.0" 873 | source = "registry+https://github.com/rust-lang/crates.io-index" 874 | 875 | [[package]] 876 | name = "rustc-ap-rustc_data_structures" 877 | version = "546.0.0" 878 | source = "registry+https://github.com/rust-lang/crates.io-index" 879 | dependencies = [ 880 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 881 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 882 | "ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", 883 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 884 | "jobserver 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 885 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 886 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 887 | "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", 888 | "rustc-ap-graphviz 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 889 | "rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 890 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 891 | "rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 892 | "rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 893 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 894 | "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 895 | ] 896 | 897 | [[package]] 898 | name = "rustc-ap-rustc_errors" 899 | version = "546.0.0" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | dependencies = [ 902 | "annotate-snippets 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 903 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 904 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 905 | "rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 906 | "rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 907 | "rustc-ap-syntax_pos 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 908 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 909 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 910 | ] 911 | 912 | [[package]] 913 | name = "rustc-ap-rustc_lexer" 914 | version = "546.0.0" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | 917 | [[package]] 918 | name = "rustc-ap-rustc_macros" 919 | version = "546.0.0" 920 | source = "registry+https://github.com/rust-lang/crates.io-index" 921 | dependencies = [ 922 | "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 923 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 924 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 925 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 926 | "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", 927 | ] 928 | 929 | [[package]] 930 | name = "rustc-ap-rustc_target" 931 | version = "546.0.0" 932 | source = "registry+https://github.com/rust-lang/crates.io-index" 933 | dependencies = [ 934 | "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 935 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 936 | "rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 937 | "rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 938 | "rustc-ap-syntax_pos 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 939 | ] 940 | 941 | [[package]] 942 | name = "rustc-ap-serialize" 943 | version = "546.0.0" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | dependencies = [ 946 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 947 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 948 | ] 949 | 950 | [[package]] 951 | name = "rustc-ap-syntax" 952 | version = "546.0.0" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | dependencies = [ 955 | "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 956 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 957 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 958 | "rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 959 | "rustc-ap-rustc_errors 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 960 | "rustc-ap-rustc_lexer 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 961 | "rustc-ap-rustc_macros 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 962 | "rustc-ap-rustc_target 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 963 | "rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 964 | "rustc-ap-syntax_pos 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 965 | "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 966 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 967 | ] 968 | 969 | [[package]] 970 | name = "rustc-ap-syntax_pos" 971 | version = "546.0.0" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | dependencies = [ 974 | "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 975 | "rustc-ap-arena 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 976 | "rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 977 | "rustc-ap-rustc_macros 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 978 | "rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 979 | "scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 980 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 981 | ] 982 | 983 | [[package]] 984 | name = "rustc-hash" 985 | version = "1.0.1" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | dependencies = [ 988 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 989 | ] 990 | 991 | [[package]] 992 | name = "rustc-rayon" 993 | version = "0.2.0" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | dependencies = [ 996 | "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 997 | "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 998 | "rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "rustc-rayon-core" 1003 | version = "0.2.0" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | dependencies = [ 1006 | "crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1007 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1008 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 1009 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "rustc-serialize" 1014 | version = "0.3.24" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | 1017 | [[package]] 1018 | name = "rustc_version" 1019 | version = "0.2.3" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | dependencies = [ 1022 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "ryu" 1027 | version = "1.0.0" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | 1030 | [[package]] 1031 | name = "safemem" 1032 | version = "0.3.2" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | 1035 | [[package]] 1036 | name = "scoped-tls" 1037 | version = "1.0.0" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | 1040 | [[package]] 1041 | name = "scopeguard" 1042 | version = "0.3.3" 1043 | source = "registry+https://github.com/rust-lang/crates.io-index" 1044 | 1045 | [[package]] 1046 | name = "semver" 1047 | version = "0.9.0" 1048 | source = "registry+https://github.com/rust-lang/crates.io-index" 1049 | dependencies = [ 1050 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1051 | ] 1052 | 1053 | [[package]] 1054 | name = "semver-parser" 1055 | version = "0.7.0" 1056 | source = "registry+https://github.com/rust-lang/crates.io-index" 1057 | 1058 | [[package]] 1059 | name = "serde" 1060 | version = "1.0.99" 1061 | source = "registry+https://github.com/rust-lang/crates.io-index" 1062 | dependencies = [ 1063 | "serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 1064 | ] 1065 | 1066 | [[package]] 1067 | name = "serde_derive" 1068 | version = "1.0.99" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | dependencies = [ 1071 | "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1072 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1073 | "syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "serde_json" 1078 | version = "1.0.40" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | dependencies = [ 1081 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1082 | "ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1083 | "serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)", 1084 | ] 1085 | 1086 | [[package]] 1087 | name = "siphasher" 1088 | version = "0.2.3" 1089 | source = "registry+https://github.com/rust-lang/crates.io-index" 1090 | 1091 | [[package]] 1092 | name = "smallvec" 1093 | version = "0.6.10" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | 1096 | [[package]] 1097 | name = "stable_deref_trait" 1098 | version = "1.1.1" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | 1101 | [[package]] 1102 | name = "strsim" 1103 | version = "0.8.0" 1104 | source = "registry+https://github.com/rust-lang/crates.io-index" 1105 | 1106 | [[package]] 1107 | name = "strsim" 1108 | version = "0.9.2" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | 1111 | [[package]] 1112 | name = "syn" 1113 | version = "0.15.44" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | dependencies = [ 1116 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 1117 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1118 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1119 | ] 1120 | 1121 | [[package]] 1122 | name = "syn" 1123 | version = "1.0.3" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | dependencies = [ 1126 | "proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1127 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1128 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1129 | ] 1130 | 1131 | [[package]] 1132 | name = "synstructure" 1133 | version = "0.10.2" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | dependencies = [ 1136 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 1137 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1138 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 1139 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1140 | ] 1141 | 1142 | [[package]] 1143 | name = "termcolor" 1144 | version = "1.0.5" 1145 | source = "registry+https://github.com/rust-lang/crates.io-index" 1146 | dependencies = [ 1147 | "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1148 | ] 1149 | 1150 | [[package]] 1151 | name = "textwrap" 1152 | version = "0.11.0" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | dependencies = [ 1155 | "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "thread_local" 1160 | version = "0.3.6" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | dependencies = [ 1163 | "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 1164 | ] 1165 | 1166 | [[package]] 1167 | name = "time" 1168 | version = "0.1.42" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | dependencies = [ 1171 | "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)", 1172 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1173 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 1174 | ] 1175 | 1176 | [[package]] 1177 | name = "traitobject" 1178 | version = "0.1.0" 1179 | source = "registry+https://github.com/rust-lang/crates.io-index" 1180 | 1181 | [[package]] 1182 | name = "typeable" 1183 | version = "0.1.2" 1184 | source = "registry+https://github.com/rust-lang/crates.io-index" 1185 | 1186 | [[package]] 1187 | name = "typemap" 1188 | version = "0.3.3" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | dependencies = [ 1191 | "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "unicase" 1196 | version = "1.4.2" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | dependencies = [ 1199 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1200 | ] 1201 | 1202 | [[package]] 1203 | name = "unicode-bidi" 1204 | version = "0.3.4" 1205 | source = "registry+https://github.com/rust-lang/crates.io-index" 1206 | dependencies = [ 1207 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1208 | ] 1209 | 1210 | [[package]] 1211 | name = "unicode-normalization" 1212 | version = "0.1.8" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | dependencies = [ 1215 | "smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "unicode-width" 1220 | version = "0.1.5" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | 1223 | [[package]] 1224 | name = "unicode-xid" 1225 | version = "0.1.0" 1226 | source = "registry+https://github.com/rust-lang/crates.io-index" 1227 | 1228 | [[package]] 1229 | name = "unicode-xid" 1230 | version = "0.2.0" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | 1233 | [[package]] 1234 | name = "unsafe-any" 1235 | version = "0.4.2" 1236 | source = "registry+https://github.com/rust-lang/crates.io-index" 1237 | dependencies = [ 1238 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "url" 1243 | version = "1.7.2" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | dependencies = [ 1246 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1247 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1248 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "vec_map" 1253 | version = "0.8.1" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | 1256 | [[package]] 1257 | name = "version_check" 1258 | version = "0.1.5" 1259 | source = "registry+https://github.com/rust-lang/crates.io-index" 1260 | 1261 | [[package]] 1262 | name = "wasi" 1263 | version = "0.5.0" 1264 | source = "registry+https://github.com/rust-lang/crates.io-index" 1265 | 1266 | [[package]] 1267 | name = "winapi" 1268 | version = "0.3.7" 1269 | source = "registry+https://github.com/rust-lang/crates.io-index" 1270 | dependencies = [ 1271 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1272 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1273 | ] 1274 | 1275 | [[package]] 1276 | name = "winapi-i686-pc-windows-gnu" 1277 | version = "0.4.0" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | 1280 | [[package]] 1281 | name = "winapi-util" 1282 | version = "0.1.2" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | dependencies = [ 1285 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "winapi-x86_64-pc-windows-gnu" 1290 | version = "0.4.0" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | 1293 | [[package]] 1294 | name = "wincolor" 1295 | version = "1.0.2" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | dependencies = [ 1298 | "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", 1299 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1300 | ] 1301 | 1302 | [metadata] 1303 | "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 1304 | "checksum annotate-snippets 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c7021ce4924a3f25f802b2cccd1af585e39ea1a363a1aa2e72afe54b67a3a7a7" 1305 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 1306 | "checksum arrayvec 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b8d73f9beda665eaa98ab9e4f7442bd4e7de6652587de55b2525e52e29c1b0ba" 1307 | "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1308 | "checksum autocfg 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "22130e92352b948e7e82a49cdb0aa94f2211761117f29e052dd397c1ac33542b" 1309 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 1310 | "checksum bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd" 1311 | "checksum bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f023abfa58aad6f6bc4ae0630799e24d5ee0ab8bb2e49f651d9b1f9aa4f52f30" 1312 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 1313 | "checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" 1314 | "checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" 1315 | "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 1316 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1317 | "checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" 1318 | "checksum crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f739f8c5363aca78cfb059edf753d8f0d36908c348f3d8d1503f03d8b75d9cf3" 1319 | "checksum crossbeam-epoch 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "927121f5407de9956180ff5e936fe3cf4324279280001cd56b669d28ee7e9150" 1320 | "checksum crossbeam-utils 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2760899e32a1d58d5abb31129f8fae5de75220bc2176e77ff7c627ae45c918d9" 1321 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" 1322 | "checksum derive_more 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f57d78cf3bd45270dad4e70c21ec77a960b36c7a841ff9db76aaa775a8fb871" 1323 | "checksum docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f525a586d310c87df72ebcd98009e57f1cc030c8c268305287a476beb653969" 1324 | "checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" 1325 | "checksum ena 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dc01d68e08ca384955a3aeba9217102ca1aa85b6e168639bf27739f1d749d87" 1326 | "checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" 1327 | "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" 1328 | "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 1329 | "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" 1330 | "checksum getrandom 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6171a6cc63fbabbe27c2b5ee268e8b7fe5dc1eb0dd2dfad537c1dfed6f69117e" 1331 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 1332 | "checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" 1333 | "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" 1334 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1335 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 1336 | "checksum iron 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c6d308ca2d884650a8bf9ed2ff4cb13fbb2207b71f64cda11dc9b892067295e8" 1337 | "checksum iron-hmac 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "705e3e24cab7f058e9b447eba6fa493f5ffda0ac73487503c305f0ea56eb1b9b" 1338 | "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" 1339 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 1340 | "checksum jobserver 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "f74e73053eaf95399bf926e48fc7a2a3ce50bd0eaaa2357d391e95b2dcdd4f10" 1341 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 1342 | "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" 1343 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 1344 | "checksum libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)" = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba" 1345 | "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" 1346 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 1347 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1348 | "checksum logger 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6c9172cb4c2f6c52117e25570983edcbb322f130b1031ae5d5d6b1abe7eeb493" 1349 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1350 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1351 | "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3" 1352 | "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" 1353 | "checksum mime_guess 1.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "0d977de9ee851a0b16e932979515c0f3da82403183879811bc97d50bd9cc50f7" 1354 | "checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" 1355 | "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" 1356 | "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" 1357 | "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" 1358 | "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" 1359 | "checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" 1360 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1361 | "checksum persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e8fa0009c4f3d350281309909c618abddf10bb7e3145f28410782f6a5ec74c5" 1362 | "checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" 1363 | "checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" 1364 | "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" 1365 | "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" 1366 | "checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" 1367 | "checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" 1368 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1369 | "checksum proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c5c2380ae88876faae57698be9e9775e3544decad214599c3a6266cca6ac802" 1370 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1371 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1372 | "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1373 | "checksum racer 2.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "0727b9d7baaf9e42851145545d7b980b5c1752bd16a4c77c925c5e573d0069d9" 1374 | "checksum racer-cargo-metadata 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2b60cd72291a641dbaa649e9e328df552186dda1fea834c55cf28594a25b7c6f" 1375 | "checksum racer-interner 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "206a244afd319767bdf97cf4e94c0d5d3b1de9cb23fd25434e7992cca4d4fa4c" 1376 | "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" 1377 | "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" 1378 | "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" 1379 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1380 | "checksum rand 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d47eab0e83d9693d40f825f86948aa16eff6750ead4bdffc4ab95b8b3a7f052c" 1381 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1382 | "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" 1383 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 1384 | "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 1385 | "checksum rand_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "615e683324e75af5d43d8f7a39ffe3ee4a9dc42c5c701167a71dc59c3a493aca" 1386 | "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 1387 | "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1388 | "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 1389 | "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 1390 | "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 1391 | "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 1392 | "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 1393 | "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 1394 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1395 | "checksum regex 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88c3d9193984285d544df4a30c23a4e62ead42edf70a4452ceb76dac1ce05c26" 1396 | "checksum regex-syntax 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b143cceb2ca5e56d5671988ef8b15615733e7ee16cd348e064333b251b89343f" 1397 | "checksum rls-span 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2e9bed56f6272bd85d9d06d1aaeef80c5fddc78a82199eb36dceb5f94e7d934" 1398 | "checksum route-recognizer 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "ea509065eb0b3c446acdd0102f0d46567dc30902dc0be91d6552035d92b0f4f8" 1399 | "checksum router 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dc63b6f3b8895b0d04e816b2b1aa58fdba2d5acca3cbb8f0ab8e017347d57397" 1400 | "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a" 1401 | "checksum rustc-ap-arena 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc2e1e68b64268c543bfa6e63e3c0d9ea58074c71396f42f76931f35a9287f9" 1402 | "checksum rustc-ap-graphviz 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c108d647ce0dd46477b048eafff5a6273b5652e02d47424b0cd684147379c811" 1403 | "checksum rustc-ap-rustc_data_structures 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "656771744e0783cb8e4481e3b8b1f975687610aaf18833b898018111a0e0e582" 1404 | "checksum rustc-ap-rustc_errors 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e37064f6624bc799bfaa2968b61ee6880926dea2a8bba69f18aef6c8e69c9604" 1405 | "checksum rustc-ap-rustc_lexer 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef5bc0a971823637ea23a857f0ef1467f44b1e05d71968821f83a0abe53e0fe3" 1406 | "checksum rustc-ap-rustc_macros 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b90037e3336fe8835f468db44d0848ae10d9cc8533ae89b55828883f905b7e80" 1407 | "checksum rustc-ap-rustc_target 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cadf9ca07315eab3a7a21f63872f9cc81e250fd6ede0419c24f8926ade73a45d" 1408 | "checksum rustc-ap-serialize 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "61673783f2089e01033ffa82d1988f55175402071b31253a358292e1624d4602" 1409 | "checksum rustc-ap-syntax 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "28f3dd1346d5b0269c07a4a78855e309a298ab569c9c1302d4d4f57f8eee4e84" 1410 | "checksum rustc-ap-syntax_pos 546.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "45e67b526dbda3a0c7dab91c8947d43685e7697f52686a4949da3c179cd7c979" 1411 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" 1412 | "checksum rustc-rayon 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2e07e19601f21c59aad953c2632172ba70cb27e685771514ea66e4062b3363" 1413 | "checksum rustc-rayon-core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "79d38ca7cbc22fa59f09d8534ea4b27f67b0facf0cbe274433aceea227a02543" 1414 | "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" 1415 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1416 | "checksum ryu 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c92464b447c0ee8c4fb3824ecc8383b81717b9f1e74ba2e72540aef7b9f82997" 1417 | "checksum safemem 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d2b08423011dae9a5ca23f07cf57dac3857f5c885d352b76f6d95f4aea9434d0" 1418 | "checksum scoped-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" 1419 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 1420 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1421 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1422 | "checksum serde 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "fec2851eb56d010dc9a21b89ca53ee75e6528bab60c11e89d38390904982da9f" 1423 | "checksum serde_derive 1.0.99 (registry+https://github.com/rust-lang/crates.io-index)" = "cb4dc18c61206b08dc98216c98faa0232f4337e1e1b8574551d5bad29ea1b425" 1424 | "checksum serde_json 1.0.40 (registry+https://github.com/rust-lang/crates.io-index)" = "051c49229f282f7c6f3813f8286cc1e3323e8051823fce42c7ea80fe13521704" 1425 | "checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" 1426 | "checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7" 1427 | "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" 1428 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1429 | "checksum strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "032c03039aae92b350aad2e3779c352e104d919cb192ba2fabbd7b831ce4f0f6" 1430 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1431 | "checksum syn 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "158521e6f544e7e3dcfc370ac180794aa38cb34a1b1e07609376d4adcf429b93" 1432 | "checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" 1433 | "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" 1434 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1435 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1436 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1437 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 1438 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 1439 | "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" 1440 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 1441 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1442 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 1443 | "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 1444 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1445 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1446 | "checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" 1447 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1448 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 1449 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1450 | "checksum wasi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd5442abcac6525a045cc8c795aedb60da7a2e5e89c7bf18a0d5357849bb23c7" 1451 | "checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" 1452 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1453 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1454 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1455 | "checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" 1456 | --------------------------------------------------------------------------------