├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── calculator-cli ├── Cargo.toml └── src │ └── main.rs ├── calculator-engine ├── Cargo.lock ├── Cargo.toml └── src │ ├── ast.rs │ ├── errors.rs │ ├── execution │ ├── hybrid.rs │ ├── interpret.rs │ ├── jit.rs │ └── mod.rs │ ├── lib.rs │ └── parser │ ├── errors.rs │ └── mod.rs ├── calculator-gtk ├── Cargo.toml ├── glade │ ├── main.glade │ └── main.glade~ └── src │ └── main.rs └── calculator-repl ├── Cargo.toml └── src └── main.rs /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | /*/target 5 | 6 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 7 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 8 | # Cargo.lock 9 | 10 | # These are backup files generated by rustfmt 11 | **/*.rs.bk 12 | 13 | # Hidden files 14 | .* 15 | /*/.* 16 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | 3 | members = [ 4 | "calculator-engine", 5 | "calculator-repl", 6 | "calculator-cli", 7 | "calculator-gtk" 8 | ] 9 | 10 | [profile.release] 11 | codegen-units = 1 12 | lto = "thin" 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Calculator 2 | 3 | Simple mathematical expression evaluator (aka calculator) built using Nom, Pratt Parser, LLVM, Cranelift and Relm. 4 | 5 | Every mathematical expression is parsed to lexical tokens using Nom. After initial parsing is complete, Pratt Parser algorithm is used to create AST (Abstract Syntax Tree) with right operator precedence. 6 | 7 | There is simple interpreter implementation, which visits every AST node and computes result. 8 | 9 | Alongside interpreter there is JIT compiler implementation with Cranelift and LLVM backends. 10 | 11 | For end-user every mathematical expression is evaluated simultaneously by the interpreter and JIT compiler. JIT and Interpretator are racing to compute value first. 12 | 13 | | Crate name | Description | 14 | | ----------------- | ----------------------------------------------------------------- | 15 | | calculator_engine | Implementation of expression parser and execution modules | 16 | | calculator_cli | Simple CLI interface that reads input from command line arguments ![CLI](https://i.imgur.com/2MztNbE.gif) | 17 | | calculator_repl | REPL with built-in basic syntax highlighting ![REPL](https://i.imgur.com/VPv3CuY.gif) | 18 | | calculator_gtk | Simple cross-platform GTK GUI ![GTK UI](https://i.imgur.com/2kOWsZY.gif) | 19 | -------------------------------------------------------------------------------- /calculator-cli/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "calculator-cli" 3 | version = "0.1.0" 4 | authors = ["Alik Aslanyan "] 5 | edition = "2018" 6 | license = "GPL-3.0" 7 | 8 | [dependencies] 9 | calculator-engine = { path = "../calculator-engine" } 10 | ansi_term = "0.12.1" -------------------------------------------------------------------------------- /calculator-cli/src/main.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use ansi_term::Color; 25 | use calculator_engine::execution::hybrid::{Hybrid, JitOptimizationLevel}; 26 | 27 | fn main() { 28 | let red = Color::Red.bold(); 29 | let green = Color::Green; 30 | 31 | match Hybrid::exec( 32 | &std::env::args() 33 | .skip(1) 34 | .fold(String::new(), |mut acc, arg| { 35 | acc.push(' '); 36 | acc.push_str(&arg); 37 | acc 38 | }), 39 | JitOptimizationLevel::None, 40 | ) { 41 | Ok(result) => println!( 42 | "{prefix}{text}{suffix}", 43 | prefix = green.prefix(), 44 | text = result, 45 | suffix = green.suffix() 46 | ), 47 | Err(result) => println!( 48 | "{prefix}{text}{suffix}", 49 | prefix = red.prefix(), 50 | text = result, 51 | suffix = red.suffix() 52 | ), 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /calculator-engine/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "adler32" 5 | version = "1.0.4" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | 8 | [[package]] 9 | name = "aho-corasick" 10 | version = "0.7.6" 11 | source = "registry+https://github.com/rust-lang/crates.io-index" 12 | dependencies = [ 13 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 14 | ] 15 | 16 | [[package]] 17 | name = "arrayvec" 18 | version = "0.4.12" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | dependencies = [ 21 | "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", 22 | ] 23 | 24 | [[package]] 25 | name = "arrayvec" 26 | version = "0.5.1" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | 29 | [[package]] 30 | name = "atty" 31 | version = "0.2.13" 32 | source = "registry+https://github.com/rust-lang/crates.io-index" 33 | dependencies = [ 34 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 35 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 36 | ] 37 | 38 | [[package]] 39 | name = "autocfg" 40 | version = "0.1.7" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | 43 | [[package]] 44 | name = "backtrace" 45 | version = "0.3.40" 46 | source = "registry+https://github.com/rust-lang/crates.io-index" 47 | dependencies = [ 48 | "backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", 49 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 50 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 51 | "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 52 | ] 53 | 54 | [[package]] 55 | name = "backtrace-sys" 56 | version = "0.1.32" 57 | source = "registry+https://github.com/rust-lang/crates.io-index" 58 | dependencies = [ 59 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 60 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 61 | ] 62 | 63 | [[package]] 64 | name = "base64" 65 | version = "0.10.1" 66 | source = "registry+https://github.com/rust-lang/crates.io-index" 67 | dependencies = [ 68 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 69 | ] 70 | 71 | [[package]] 72 | name = "bitflags" 73 | version = "1.2.1" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | 76 | [[package]] 77 | name = "byteorder" 78 | version = "1.3.2" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | 81 | [[package]] 82 | name = "bytes" 83 | version = "0.4.12" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | dependencies = [ 86 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 87 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 88 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 89 | ] 90 | 91 | [[package]] 92 | name = "c2-chacha" 93 | version = "0.2.3" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | dependencies = [ 96 | "ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 97 | ] 98 | 99 | [[package]] 100 | name = "calculator" 101 | version = "0.1.0" 102 | dependencies = [ 103 | "arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 104 | "clone_all 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 105 | "crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", 106 | "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", 107 | "inkwell 0.1.0 (git+https://github.com/TheDan64/inkwell?branch=llvm8-0)", 108 | "itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 109 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 110 | "nom 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 111 | "pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 112 | "snafu 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 113 | ] 114 | 115 | [[package]] 116 | name = "cargo_toml" 117 | version = "0.8.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | dependencies = [ 120 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 121 | "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 122 | "toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", 123 | ] 124 | 125 | [[package]] 126 | name = "cc" 127 | version = "1.0.47" 128 | source = "registry+https://github.com/rust-lang/crates.io-index" 129 | 130 | [[package]] 131 | name = "cfg-if" 132 | version = "0.1.10" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | 135 | [[package]] 136 | name = "chrono" 137 | version = "0.4.9" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | dependencies = [ 140 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 141 | "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 142 | "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 143 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 144 | ] 145 | 146 | [[package]] 147 | name = "clone_all" 148 | version = "0.1.1" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | 151 | [[package]] 152 | name = "cloudabi" 153 | version = "0.0.3" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | dependencies = [ 156 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 157 | ] 158 | 159 | [[package]] 160 | name = "cookie" 161 | version = "0.12.0" 162 | source = "registry+https://github.com/rust-lang/crates.io-index" 163 | dependencies = [ 164 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 165 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 166 | ] 167 | 168 | [[package]] 169 | name = "cookie_store" 170 | version = "0.7.0" 171 | source = "registry+https://github.com/rust-lang/crates.io-index" 172 | dependencies = [ 173 | "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 174 | "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 175 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 177 | "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", 178 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 179 | "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 181 | "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 182 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 183 | ] 184 | 185 | [[package]] 186 | name = "core-foundation" 187 | version = "0.6.4" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | dependencies = [ 190 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 191 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 192 | ] 193 | 194 | [[package]] 195 | name = "core-foundation-sys" 196 | version = "0.6.2" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | 199 | [[package]] 200 | name = "crc32fast" 201 | version = "1.2.0" 202 | source = "registry+https://github.com/rust-lang/crates.io-index" 203 | dependencies = [ 204 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 205 | ] 206 | 207 | [[package]] 208 | name = "crossbeam" 209 | version = "0.7.3" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | dependencies = [ 212 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 216 | "crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 217 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 218 | ] 219 | 220 | [[package]] 221 | name = "crossbeam-channel" 222 | version = "0.4.0" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | dependencies = [ 225 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 226 | ] 227 | 228 | [[package]] 229 | name = "crossbeam-deque" 230 | version = "0.7.2" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | dependencies = [ 233 | "crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 234 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 235 | ] 236 | 237 | [[package]] 238 | name = "crossbeam-epoch" 239 | version = "0.8.0" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | dependencies = [ 242 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 243 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 244 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 245 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 246 | "memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 247 | "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 248 | ] 249 | 250 | [[package]] 251 | name = "crossbeam-queue" 252 | version = "0.1.2" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | dependencies = [ 255 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 256 | ] 257 | 258 | [[package]] 259 | name = "crossbeam-queue" 260 | version = "0.2.0" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | dependencies = [ 263 | "crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 264 | ] 265 | 266 | [[package]] 267 | name = "crossbeam-utils" 268 | version = "0.6.6" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | dependencies = [ 271 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 272 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 273 | ] 274 | 275 | [[package]] 276 | name = "crossbeam-utils" 277 | version = "0.7.0" 278 | source = "registry+https://github.com/rust-lang/crates.io-index" 279 | dependencies = [ 280 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 281 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 282 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 283 | ] 284 | 285 | [[package]] 286 | name = "derive_more" 287 | version = "0.99.2" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | dependencies = [ 290 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 291 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 292 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 293 | ] 294 | 295 | [[package]] 296 | name = "doc-comment" 297 | version = "0.3.1" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | 300 | [[package]] 301 | name = "dtoa" 302 | version = "0.4.4" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | 305 | [[package]] 306 | name = "either" 307 | version = "1.5.3" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | 310 | [[package]] 311 | name = "encoding_rs" 312 | version = "0.8.20" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | dependencies = [ 315 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 316 | ] 317 | 318 | [[package]] 319 | name = "env_logger" 320 | version = "0.6.2" 321 | source = "registry+https://github.com/rust-lang/crates.io-index" 322 | dependencies = [ 323 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 324 | "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 325 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 326 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 327 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 328 | ] 329 | 330 | [[package]] 331 | name = "error-chain" 332 | version = "0.12.1" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | dependencies = [ 335 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 336 | ] 337 | 338 | [[package]] 339 | name = "failure" 340 | version = "0.1.6" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | dependencies = [ 343 | "backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", 344 | "failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 345 | ] 346 | 347 | [[package]] 348 | name = "failure_derive" 349 | version = "0.1.6" 350 | source = "registry+https://github.com/rust-lang/crates.io-index" 351 | dependencies = [ 352 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 353 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 354 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 355 | "synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", 356 | ] 357 | 358 | [[package]] 359 | name = "flate2" 360 | version = "1.0.13" 361 | source = "registry+https://github.com/rust-lang/crates.io-index" 362 | dependencies = [ 363 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 364 | "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 365 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 366 | "miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 367 | ] 368 | 369 | [[package]] 370 | name = "fnv" 371 | version = "1.0.6" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | 374 | [[package]] 375 | name = "foreign-types" 376 | version = "0.3.2" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | dependencies = [ 379 | "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 380 | ] 381 | 382 | [[package]] 383 | name = "foreign-types-shared" 384 | version = "0.1.1" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | 387 | [[package]] 388 | name = "fuchsia-cprng" 389 | version = "0.1.1" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | 392 | [[package]] 393 | name = "fuchsia-zircon" 394 | version = "0.3.3" 395 | source = "registry+https://github.com/rust-lang/crates.io-index" 396 | dependencies = [ 397 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 398 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 399 | ] 400 | 401 | [[package]] 402 | name = "fuchsia-zircon-sys" 403 | version = "0.3.3" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | 406 | [[package]] 407 | name = "futures" 408 | version = "0.1.29" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | 411 | [[package]] 412 | name = "futures-cpupool" 413 | version = "0.1.8" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | dependencies = [ 416 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 417 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 418 | ] 419 | 420 | [[package]] 421 | name = "getrandom" 422 | version = "0.1.13" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | dependencies = [ 425 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 426 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 427 | "wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 428 | ] 429 | 430 | [[package]] 431 | name = "h2" 432 | version = "0.1.26" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | dependencies = [ 435 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 437 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 438 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 439 | "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", 440 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 441 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 442 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 443 | "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 444 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 445 | ] 446 | 447 | [[package]] 448 | name = "hermit-abi" 449 | version = "0.1.3" 450 | source = "registry+https://github.com/rust-lang/crates.io-index" 451 | dependencies = [ 452 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 453 | ] 454 | 455 | [[package]] 456 | name = "http" 457 | version = "0.1.19" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | dependencies = [ 460 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 461 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 462 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 463 | ] 464 | 465 | [[package]] 466 | name = "http-body" 467 | version = "0.1.0" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | dependencies = [ 470 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 471 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 472 | "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", 473 | "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 474 | ] 475 | 476 | [[package]] 477 | name = "httparse" 478 | version = "1.3.4" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | 481 | [[package]] 482 | name = "humantime" 483 | version = "1.3.0" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | dependencies = [ 486 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 487 | ] 488 | 489 | [[package]] 490 | name = "hyper" 491 | version = "0.12.35" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | dependencies = [ 494 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 495 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 496 | "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 497 | "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", 498 | "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", 499 | "http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 500 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 501 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 502 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 503 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 505 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 507 | "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", 508 | "tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 509 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 510 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 511 | "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 512 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 513 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 514 | "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 515 | "want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 516 | ] 517 | 518 | [[package]] 519 | name = "hyper-tls" 520 | version = "0.3.2" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | dependencies = [ 523 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 524 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 525 | "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", 526 | "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 527 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 528 | ] 529 | 530 | [[package]] 531 | name = "idna" 532 | version = "0.1.5" 533 | source = "registry+https://github.com/rust-lang/crates.io-index" 534 | dependencies = [ 535 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 536 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 537 | "unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 538 | ] 539 | 540 | [[package]] 541 | name = "idna" 542 | version = "0.2.0" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | dependencies = [ 545 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 546 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 547 | "unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 548 | ] 549 | 550 | [[package]] 551 | name = "indexmap" 552 | version = "1.3.0" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | dependencies = [ 555 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 556 | ] 557 | 558 | [[package]] 559 | name = "inkwell" 560 | version = "0.1.0" 561 | source = "git+https://github.com/TheDan64/inkwell?branch=llvm8-0#f9740dcecedc7ebe394c8eaf6ce2a083c141c625" 562 | dependencies = [ 563 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 564 | "inkwell_internals 0.1.0 (git+https://github.com/TheDan64/inkwell?branch=llvm8-0)", 565 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 566 | "llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 568 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 569 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 570 | ] 571 | 572 | [[package]] 573 | name = "inkwell_internals" 574 | version = "0.1.0" 575 | source = "git+https://github.com/TheDan64/inkwell?branch=llvm8-0#f9740dcecedc7ebe394c8eaf6ce2a083c141c625" 576 | dependencies = [ 577 | "cargo_toml 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 578 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 579 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 580 | "reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)", 581 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 582 | ] 583 | 584 | [[package]] 585 | name = "iovec" 586 | version = "0.1.4" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | dependencies = [ 589 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 590 | ] 591 | 592 | [[package]] 593 | name = "itertools" 594 | version = "0.8.1" 595 | source = "registry+https://github.com/rust-lang/crates.io-index" 596 | dependencies = [ 597 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 598 | ] 599 | 600 | [[package]] 601 | name = "itoa" 602 | version = "0.4.4" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | 605 | [[package]] 606 | name = "kernel32-sys" 607 | version = "0.2.2" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | dependencies = [ 610 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 611 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 612 | ] 613 | 614 | [[package]] 615 | name = "lazy_static" 616 | version = "1.4.0" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | 619 | [[package]] 620 | name = "lexical-core" 621 | version = "0.4.6" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | dependencies = [ 624 | "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 625 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 626 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 627 | "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 628 | "static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 629 | ] 630 | 631 | [[package]] 632 | name = "libc" 633 | version = "0.2.65" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | 636 | [[package]] 637 | name = "llvm-sys" 638 | version = "80.1.1" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | dependencies = [ 641 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 642 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 643 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 644 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 645 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 646 | ] 647 | 648 | [[package]] 649 | name = "lock_api" 650 | version = "0.3.1" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | dependencies = [ 653 | "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 654 | ] 655 | 656 | [[package]] 657 | name = "log" 658 | version = "0.4.8" 659 | source = "registry+https://github.com/rust-lang/crates.io-index" 660 | dependencies = [ 661 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 662 | ] 663 | 664 | [[package]] 665 | name = "matches" 666 | version = "0.1.8" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | 669 | [[package]] 670 | name = "maybe-uninit" 671 | version = "2.0.0" 672 | source = "registry+https://github.com/rust-lang/crates.io-index" 673 | 674 | [[package]] 675 | name = "memchr" 676 | version = "2.2.1" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | 679 | [[package]] 680 | name = "memoffset" 681 | version = "0.5.3" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | dependencies = [ 684 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 685 | ] 686 | 687 | [[package]] 688 | name = "mime" 689 | version = "0.3.14" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | 692 | [[package]] 693 | name = "mime_guess" 694 | version = "2.0.1" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | dependencies = [ 697 | "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 698 | "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 699 | ] 700 | 701 | [[package]] 702 | name = "miniz_oxide" 703 | version = "0.3.5" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | dependencies = [ 706 | "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 707 | ] 708 | 709 | [[package]] 710 | name = "mio" 711 | version = "0.6.19" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | dependencies = [ 714 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 715 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 716 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 717 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 718 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 719 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 720 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 721 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 722 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 723 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 724 | ] 725 | 726 | [[package]] 727 | name = "miow" 728 | version = "0.2.1" 729 | source = "registry+https://github.com/rust-lang/crates.io-index" 730 | dependencies = [ 731 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 732 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 733 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 734 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 735 | ] 736 | 737 | [[package]] 738 | name = "native-tls" 739 | version = "0.2.3" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | dependencies = [ 742 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 743 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 744 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 745 | "openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)", 746 | "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 747 | "openssl-sys 0.9.52 (registry+https://github.com/rust-lang/crates.io-index)", 748 | "schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 749 | "security-framework 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 750 | "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 751 | "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 752 | ] 753 | 754 | [[package]] 755 | name = "net2" 756 | version = "0.2.33" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | dependencies = [ 759 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 760 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 761 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 762 | ] 763 | 764 | [[package]] 765 | name = "nodrop" 766 | version = "0.1.14" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | 769 | [[package]] 770 | name = "nom" 771 | version = "5.0.1" 772 | source = "registry+https://github.com/rust-lang/crates.io-index" 773 | dependencies = [ 774 | "lexical-core 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 775 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 776 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 777 | ] 778 | 779 | [[package]] 780 | name = "num-integer" 781 | version = "0.1.41" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | dependencies = [ 784 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 785 | "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", 786 | ] 787 | 788 | [[package]] 789 | name = "num-traits" 790 | version = "0.2.9" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | dependencies = [ 793 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 794 | ] 795 | 796 | [[package]] 797 | name = "num_cpus" 798 | version = "1.11.1" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | dependencies = [ 801 | "hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 802 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 803 | ] 804 | 805 | [[package]] 806 | name = "once_cell" 807 | version = "1.2.0" 808 | source = "registry+https://github.com/rust-lang/crates.io-index" 809 | 810 | [[package]] 811 | name = "openssl" 812 | version = "0.10.25" 813 | source = "registry+https://github.com/rust-lang/crates.io-index" 814 | dependencies = [ 815 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 816 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 817 | "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 818 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 819 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 820 | "openssl-sys 0.9.52 (registry+https://github.com/rust-lang/crates.io-index)", 821 | ] 822 | 823 | [[package]] 824 | name = "openssl-probe" 825 | version = "0.1.2" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | 828 | [[package]] 829 | name = "openssl-sys" 830 | version = "0.9.52" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | dependencies = [ 833 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 834 | "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", 835 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 836 | "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", 837 | "vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 838 | ] 839 | 840 | [[package]] 841 | name = "parking_lot" 842 | version = "0.9.0" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | dependencies = [ 845 | "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 846 | "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 847 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 848 | ] 849 | 850 | [[package]] 851 | name = "parking_lot_core" 852 | version = "0.6.2" 853 | source = "registry+https://github.com/rust-lang/crates.io-index" 854 | dependencies = [ 855 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 856 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 857 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 858 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 859 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 860 | "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 861 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 862 | ] 863 | 864 | [[package]] 865 | name = "percent-encoding" 866 | version = "1.0.1" 867 | source = "registry+https://github.com/rust-lang/crates.io-index" 868 | 869 | [[package]] 870 | name = "percent-encoding" 871 | version = "2.1.0" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | 874 | [[package]] 875 | name = "pkg-config" 876 | version = "0.3.17" 877 | source = "registry+https://github.com/rust-lang/crates.io-index" 878 | 879 | [[package]] 880 | name = "ppv-lite86" 881 | version = "0.2.6" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | 884 | [[package]] 885 | name = "pretty_env_logger" 886 | version = "0.3.1" 887 | source = "registry+https://github.com/rust-lang/crates.io-index" 888 | dependencies = [ 889 | "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", 890 | "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 891 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 892 | ] 893 | 894 | [[package]] 895 | name = "proc-macro2" 896 | version = "0.4.30" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | dependencies = [ 899 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 900 | ] 901 | 902 | [[package]] 903 | name = "proc-macro2" 904 | version = "1.0.6" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | dependencies = [ 907 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 908 | ] 909 | 910 | [[package]] 911 | name = "publicsuffix" 912 | version = "1.5.4" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | dependencies = [ 915 | "error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", 916 | "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 917 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 918 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 919 | "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 920 | ] 921 | 922 | [[package]] 923 | name = "quick-error" 924 | version = "1.2.2" 925 | source = "registry+https://github.com/rust-lang/crates.io-index" 926 | 927 | [[package]] 928 | name = "quote" 929 | version = "0.6.13" 930 | source = "registry+https://github.com/rust-lang/crates.io-index" 931 | dependencies = [ 932 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 933 | ] 934 | 935 | [[package]] 936 | name = "quote" 937 | version = "1.0.2" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | dependencies = [ 940 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 941 | ] 942 | 943 | [[package]] 944 | name = "rand" 945 | version = "0.6.5" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | dependencies = [ 948 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 949 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 950 | "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 951 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 952 | "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 953 | "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 954 | "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 955 | "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 956 | "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 957 | "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 958 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 959 | ] 960 | 961 | [[package]] 962 | name = "rand" 963 | version = "0.7.2" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | dependencies = [ 966 | "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 967 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 968 | "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 969 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 970 | "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 971 | ] 972 | 973 | [[package]] 974 | name = "rand_chacha" 975 | version = "0.1.1" 976 | source = "registry+https://github.com/rust-lang/crates.io-index" 977 | dependencies = [ 978 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 979 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 980 | ] 981 | 982 | [[package]] 983 | name = "rand_chacha" 984 | version = "0.2.1" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | dependencies = [ 987 | "c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 988 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 989 | ] 990 | 991 | [[package]] 992 | name = "rand_core" 993 | version = "0.3.1" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | dependencies = [ 996 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 997 | ] 998 | 999 | [[package]] 1000 | name = "rand_core" 1001 | version = "0.4.2" 1002 | source = "registry+https://github.com/rust-lang/crates.io-index" 1003 | 1004 | [[package]] 1005 | name = "rand_core" 1006 | version = "0.5.1" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | dependencies = [ 1009 | "getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "rand_hc" 1014 | version = "0.1.0" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | dependencies = [ 1017 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "rand_hc" 1022 | version = "0.2.0" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | dependencies = [ 1025 | "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 1026 | ] 1027 | 1028 | [[package]] 1029 | name = "rand_isaac" 1030 | version = "0.1.1" 1031 | source = "registry+https://github.com/rust-lang/crates.io-index" 1032 | dependencies = [ 1033 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "rand_jitter" 1038 | version = "0.1.4" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | dependencies = [ 1041 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1042 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1043 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1044 | ] 1045 | 1046 | [[package]] 1047 | name = "rand_os" 1048 | version = "0.1.3" 1049 | source = "registry+https://github.com/rust-lang/crates.io-index" 1050 | dependencies = [ 1051 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1052 | "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1053 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1054 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1055 | "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1056 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1057 | ] 1058 | 1059 | [[package]] 1060 | name = "rand_pcg" 1061 | version = "0.1.2" 1062 | source = "registry+https://github.com/rust-lang/crates.io-index" 1063 | dependencies = [ 1064 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1065 | "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1066 | ] 1067 | 1068 | [[package]] 1069 | name = "rand_xorshift" 1070 | version = "0.1.1" 1071 | source = "registry+https://github.com/rust-lang/crates.io-index" 1072 | dependencies = [ 1073 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1074 | ] 1075 | 1076 | [[package]] 1077 | name = "rdrand" 1078 | version = "0.4.0" 1079 | source = "registry+https://github.com/rust-lang/crates.io-index" 1080 | dependencies = [ 1081 | "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "redox_syscall" 1086 | version = "0.1.56" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | 1089 | [[package]] 1090 | name = "regex" 1091 | version = "1.3.1" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | dependencies = [ 1094 | "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", 1095 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 1096 | "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 1097 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "regex-syntax" 1102 | version = "0.6.12" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | 1105 | [[package]] 1106 | name = "remove_dir_all" 1107 | version = "0.5.2" 1108 | source = "registry+https://github.com/rust-lang/crates.io-index" 1109 | dependencies = [ 1110 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1111 | ] 1112 | 1113 | [[package]] 1114 | name = "reqwest" 1115 | version = "0.9.22" 1116 | source = "registry+https://github.com/rust-lang/crates.io-index" 1117 | dependencies = [ 1118 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 1119 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1120 | "cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", 1121 | "cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1122 | "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", 1123 | "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", 1124 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1125 | "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", 1126 | "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", 1127 | "hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 1128 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1129 | "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", 1130 | "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1131 | "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1132 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1133 | "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", 1134 | "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", 1135 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 1136 | "tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", 1137 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1138 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1139 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 1140 | "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 1141 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1142 | "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", 1143 | "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "rustc-demangle" 1148 | version = "0.1.16" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | 1151 | [[package]] 1152 | name = "rustc_version" 1153 | version = "0.2.3" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | dependencies = [ 1156 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1157 | ] 1158 | 1159 | [[package]] 1160 | name = "ryu" 1161 | version = "1.0.2" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | 1164 | [[package]] 1165 | name = "schannel" 1166 | version = "0.1.16" 1167 | source = "registry+https://github.com/rust-lang/crates.io-index" 1168 | dependencies = [ 1169 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1170 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1171 | ] 1172 | 1173 | [[package]] 1174 | name = "scopeguard" 1175 | version = "1.0.0" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | 1178 | [[package]] 1179 | name = "security-framework" 1180 | version = "0.3.3" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | dependencies = [ 1183 | "core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", 1184 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1185 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1186 | "security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 1187 | ] 1188 | 1189 | [[package]] 1190 | name = "security-framework-sys" 1191 | version = "0.3.3" 1192 | source = "registry+https://github.com/rust-lang/crates.io-index" 1193 | dependencies = [ 1194 | "core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "semver" 1199 | version = "0.9.0" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | dependencies = [ 1202 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "semver-parser" 1207 | version = "0.7.0" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | 1210 | [[package]] 1211 | name = "serde" 1212 | version = "1.0.102" 1213 | source = "registry+https://github.com/rust-lang/crates.io-index" 1214 | dependencies = [ 1215 | "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "serde_derive" 1220 | version = "1.0.102" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | dependencies = [ 1223 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1224 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1225 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1226 | ] 1227 | 1228 | [[package]] 1229 | name = "serde_json" 1230 | version = "1.0.41" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | dependencies = [ 1233 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1234 | "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1235 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1236 | ] 1237 | 1238 | [[package]] 1239 | name = "serde_urlencoded" 1240 | version = "0.5.5" 1241 | source = "registry+https://github.com/rust-lang/crates.io-index" 1242 | dependencies = [ 1243 | "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1244 | "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", 1245 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1246 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1247 | ] 1248 | 1249 | [[package]] 1250 | name = "slab" 1251 | version = "0.4.2" 1252 | source = "registry+https://github.com/rust-lang/crates.io-index" 1253 | 1254 | [[package]] 1255 | name = "smallvec" 1256 | version = "0.6.13" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | dependencies = [ 1259 | "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "snafu" 1264 | version = "0.6.0" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | dependencies = [ 1267 | "doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 1268 | "snafu-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "snafu-derive" 1273 | version = "0.6.0" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | dependencies = [ 1276 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1277 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1278 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "static_assertions" 1283 | version = "0.3.4" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | 1286 | [[package]] 1287 | name = "string" 1288 | version = "0.2.1" 1289 | source = "registry+https://github.com/rust-lang/crates.io-index" 1290 | dependencies = [ 1291 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "syn" 1296 | version = "0.15.44" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | dependencies = [ 1299 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 1300 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1301 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1302 | ] 1303 | 1304 | [[package]] 1305 | name = "syn" 1306 | version = "1.0.8" 1307 | source = "registry+https://github.com/rust-lang/crates.io-index" 1308 | dependencies = [ 1309 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1310 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1311 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "synstructure" 1316 | version = "0.12.3" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | dependencies = [ 1319 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1320 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1321 | "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", 1322 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1323 | ] 1324 | 1325 | [[package]] 1326 | name = "tempfile" 1327 | version = "3.1.0" 1328 | source = "registry+https://github.com/rust-lang/crates.io-index" 1329 | dependencies = [ 1330 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1331 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1332 | "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1333 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1334 | "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 1335 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1336 | ] 1337 | 1338 | [[package]] 1339 | name = "termcolor" 1340 | version = "1.0.5" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | dependencies = [ 1343 | "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 1344 | ] 1345 | 1346 | [[package]] 1347 | name = "thread_local" 1348 | version = "0.3.6" 1349 | source = "registry+https://github.com/rust-lang/crates.io-index" 1350 | dependencies = [ 1351 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "time" 1356 | version = "0.1.42" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | dependencies = [ 1359 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 1360 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 1361 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "tokio" 1366 | version = "0.1.22" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | dependencies = [ 1369 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1370 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1371 | "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 1372 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1373 | "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 1374 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1375 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1376 | "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1377 | "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 1378 | "tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", 1379 | "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 1380 | ] 1381 | 1382 | [[package]] 1383 | name = "tokio-buf" 1384 | version = "0.1.1" 1385 | source = "registry+https://github.com/rust-lang/crates.io-index" 1386 | dependencies = [ 1387 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1388 | "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", 1389 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "tokio-current-thread" 1394 | version = "0.1.6" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | dependencies = [ 1397 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1398 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1399 | ] 1400 | 1401 | [[package]] 1402 | name = "tokio-executor" 1403 | version = "0.1.8" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | dependencies = [ 1406 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1407 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1408 | ] 1409 | 1410 | [[package]] 1411 | name = "tokio-io" 1412 | version = "0.1.12" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | dependencies = [ 1415 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1416 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1417 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1418 | ] 1419 | 1420 | [[package]] 1421 | name = "tokio-reactor" 1422 | version = "0.1.10" 1423 | source = "registry+https://github.com/rust-lang/crates.io-index" 1424 | dependencies = [ 1425 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1426 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1427 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1428 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1429 | "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 1430 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1431 | "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 1432 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1433 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1434 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1435 | "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 1436 | ] 1437 | 1438 | [[package]] 1439 | name = "tokio-sync" 1440 | version = "0.1.7" 1441 | source = "registry+https://github.com/rust-lang/crates.io-index" 1442 | dependencies = [ 1443 | "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 1444 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1445 | ] 1446 | 1447 | [[package]] 1448 | name = "tokio-tcp" 1449 | version = "0.1.3" 1450 | source = "registry+https://github.com/rust-lang/crates.io-index" 1451 | dependencies = [ 1452 | "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", 1453 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1454 | "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", 1455 | "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", 1456 | "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", 1457 | "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1458 | ] 1459 | 1460 | [[package]] 1461 | name = "tokio-threadpool" 1462 | version = "0.1.16" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | dependencies = [ 1465 | "crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 1466 | "crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1467 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1468 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1469 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1470 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1471 | "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 1472 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1473 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1474 | ] 1475 | 1476 | [[package]] 1477 | name = "tokio-timer" 1478 | version = "0.2.11" 1479 | source = "registry+https://github.com/rust-lang/crates.io-index" 1480 | dependencies = [ 1481 | "crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", 1482 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1483 | "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 1484 | "tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1485 | ] 1486 | 1487 | [[package]] 1488 | name = "toml" 1489 | version = "0.5.5" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | dependencies = [ 1492 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "try-lock" 1497 | version = "0.2.2" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | 1500 | [[package]] 1501 | name = "try_from" 1502 | version = "0.3.2" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | dependencies = [ 1505 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 1506 | ] 1507 | 1508 | [[package]] 1509 | name = "unicase" 1510 | version = "2.6.0" 1511 | source = "registry+https://github.com/rust-lang/crates.io-index" 1512 | dependencies = [ 1513 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 1514 | ] 1515 | 1516 | [[package]] 1517 | name = "unicode-bidi" 1518 | version = "0.3.4" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | dependencies = [ 1521 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1522 | ] 1523 | 1524 | [[package]] 1525 | name = "unicode-normalization" 1526 | version = "0.1.9" 1527 | source = "registry+https://github.com/rust-lang/crates.io-index" 1528 | dependencies = [ 1529 | "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 1530 | ] 1531 | 1532 | [[package]] 1533 | name = "unicode-xid" 1534 | version = "0.1.0" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | 1537 | [[package]] 1538 | name = "unicode-xid" 1539 | version = "0.2.0" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | 1542 | [[package]] 1543 | name = "url" 1544 | version = "1.7.2" 1545 | source = "registry+https://github.com/rust-lang/crates.io-index" 1546 | dependencies = [ 1547 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 1548 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1549 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "url" 1554 | version = "2.1.0" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | dependencies = [ 1557 | "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1558 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 1559 | "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 1560 | ] 1561 | 1562 | [[package]] 1563 | name = "uuid" 1564 | version = "0.7.4" 1565 | source = "registry+https://github.com/rust-lang/crates.io-index" 1566 | dependencies = [ 1567 | "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", 1568 | ] 1569 | 1570 | [[package]] 1571 | name = "vcpkg" 1572 | version = "0.2.7" 1573 | source = "registry+https://github.com/rust-lang/crates.io-index" 1574 | 1575 | [[package]] 1576 | name = "version_check" 1577 | version = "0.1.5" 1578 | source = "registry+https://github.com/rust-lang/crates.io-index" 1579 | 1580 | [[package]] 1581 | name = "version_check" 1582 | version = "0.9.1" 1583 | source = "registry+https://github.com/rust-lang/crates.io-index" 1584 | 1585 | [[package]] 1586 | name = "want" 1587 | version = "0.2.0" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | dependencies = [ 1590 | "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", 1591 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 1592 | "try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 1593 | ] 1594 | 1595 | [[package]] 1596 | name = "wasi" 1597 | version = "0.7.0" 1598 | source = "registry+https://github.com/rust-lang/crates.io-index" 1599 | 1600 | [[package]] 1601 | name = "winapi" 1602 | version = "0.2.8" 1603 | source = "registry+https://github.com/rust-lang/crates.io-index" 1604 | 1605 | [[package]] 1606 | name = "winapi" 1607 | version = "0.3.8" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | dependencies = [ 1610 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1611 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 1612 | ] 1613 | 1614 | [[package]] 1615 | name = "winapi-build" 1616 | version = "0.1.1" 1617 | source = "registry+https://github.com/rust-lang/crates.io-index" 1618 | 1619 | [[package]] 1620 | name = "winapi-i686-pc-windows-gnu" 1621 | version = "0.4.0" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | 1624 | [[package]] 1625 | name = "winapi-util" 1626 | version = "0.1.2" 1627 | source = "registry+https://github.com/rust-lang/crates.io-index" 1628 | dependencies = [ 1629 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1630 | ] 1631 | 1632 | [[package]] 1633 | name = "winapi-x86_64-pc-windows-gnu" 1634 | version = "0.4.0" 1635 | source = "registry+https://github.com/rust-lang/crates.io-index" 1636 | 1637 | [[package]] 1638 | name = "wincolor" 1639 | version = "1.0.2" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | dependencies = [ 1642 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1643 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 1644 | ] 1645 | 1646 | [[package]] 1647 | name = "winreg" 1648 | version = "0.6.2" 1649 | source = "registry+https://github.com/rust-lang/crates.io-index" 1650 | dependencies = [ 1651 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 1652 | ] 1653 | 1654 | [[package]] 1655 | name = "ws2_32-sys" 1656 | version = "0.2.1" 1657 | source = "registry+https://github.com/rust-lang/crates.io-index" 1658 | dependencies = [ 1659 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 1660 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 1661 | ] 1662 | 1663 | [metadata] 1664 | "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" 1665 | "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 1666 | "checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" 1667 | "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" 1668 | "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 1669 | "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 1670 | "checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" 1671 | "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" 1672 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 1673 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 1674 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 1675 | "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" 1676 | "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" 1677 | "checksum cargo_toml 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7877b00aaf997d7ed66a81281d3a8b9f9da5361df05b72785b985349979a0f3" 1678 | "checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" 1679 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 1680 | "checksum chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e8493056968583b0193c1bb04d6f7684586f3726992d6c573261941a895dbd68" 1681 | "checksum clone_all 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f41849eba0194c121ff31ccbfcc0b0fc965a3ea9f5ef23756af72a17938bc57" 1682 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 1683 | "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" 1684 | "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" 1685 | "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d" 1686 | "checksum core-foundation-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e7ca8a5221364ef15ce201e8ed2f609fc312682a8f4e0e3d4aa5879764e0fa3b" 1687 | "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 1688 | "checksum crossbeam 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" 1689 | "checksum crossbeam-channel 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "acec9a3b0b3559f15aee4f90746c4e5e293b701c0f7d3925d24e01645267b68c" 1690 | "checksum crossbeam-deque 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3aa945d63861bfe624b55d153a39684da1e8c0bc8fba932f7ee3a3c16cea3ca" 1691 | "checksum crossbeam-epoch 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5064ebdbf05ce3cb95e45c8b086f72263f4166b29b97f6baff7ef7fe047b55ac" 1692 | "checksum crossbeam-queue 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7c979cd6cfe72335896575c6b5688da489e420d36a27a0b9eb0c73db574b4a4b" 1693 | "checksum crossbeam-queue 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfd6515864a82d2f877b42813d4553292c6659498c9a2aa31bab5a15243c2700" 1694 | "checksum crossbeam-utils 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "04973fa96e96579258a5091af6003abde64af786b860f18622b82e026cca60e6" 1695 | "checksum crossbeam-utils 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce446db02cdc3165b94ae73111e570793400d0794e46125cc4056c81cbb039f4" 1696 | "checksum derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" 1697 | "checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97" 1698 | "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" 1699 | "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 1700 | "checksum encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" 1701 | "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" 1702 | "checksum error-chain 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" 1703 | "checksum failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f8273f13c977665c5db7eb2b99ae520952fe5ac831ae4cd09d80c4c7042b5ed9" 1704 | "checksum failure_derive 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0bc225b78e0391e4b8683440bf2e63c2deeeb2ce5189eab46e2b68c6d3725d08" 1705 | "checksum flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" 1706 | "checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" 1707 | "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 1708 | "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 1709 | "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 1710 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 1711 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 1712 | "checksum futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" 1713 | "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" 1714 | "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" 1715 | "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" 1716 | "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" 1717 | "checksum http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d7e06e336150b178206af098a055e3621e8336027e2b4d126bda0bc64824baaf" 1718 | "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" 1719 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 1720 | "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 1721 | "checksum hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)" = "9dbe6ed1438e1f8ad955a4701e9a944938e9519f6888d12d8558b645e247d5f6" 1722 | "checksum hyper-tls 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" 1723 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 1724 | "checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 1725 | "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 1726 | "checksum inkwell 0.1.0 (git+https://github.com/TheDan64/inkwell?branch=llvm8-0)" = "" 1727 | "checksum inkwell_internals 0.1.0 (git+https://github.com/TheDan64/inkwell?branch=llvm8-0)" = "" 1728 | "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" 1729 | "checksum itertools 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "87fa75c9dea7b07be3138c49abbb83fd4bea199b5cdc76f9804458edc5da0d6e" 1730 | "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 1731 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 1732 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1733 | "checksum lexical-core 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2304bccb228c4b020f3a4835d247df0a02a7c4686098d4167762cfbbe4c5cb14" 1734 | "checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" 1735 | "checksum llvm-sys 80.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2110cd4daf9cd8e39dd3b933b1a2a2ac7315e91f7c92b3a20beab526c63b5978" 1736 | "checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" 1737 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 1738 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 1739 | "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 1740 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 1741 | "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" 1742 | "checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" 1743 | "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" 1744 | "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" 1745 | "checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" 1746 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 1747 | "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e" 1748 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 1749 | "checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" 1750 | "checksum nom 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c618b63422da4401283884e6668d39f819a106ef51f5f59b81add00075da35ca" 1751 | "checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" 1752 | "checksum num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "443c53b3c3531dfcbfa499d8893944db78474ad7a1d87fa2d94d1a2231693ac6" 1753 | "checksum num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "76dac5ed2a876980778b8b85f75a71b6cbf0db0b1232ee12f826bccb00d09d72" 1754 | "checksum once_cell 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "891f486f630e5c5a4916c7e16c4b24a53e78c860b646e9f8e005e4f16847bfed" 1755 | "checksum openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" 1756 | "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 1757 | "checksum openssl-sys 0.9.52 (registry+https://github.com/rust-lang/crates.io-index)" = "c977d08e1312e2f7e4b86f9ebaa0ed3b19d1daff75fae88bbb88108afbd801fc" 1758 | "checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" 1759 | "checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" 1760 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 1761 | "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1762 | "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" 1763 | "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" 1764 | "checksum pretty_env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "717ee476b1690853d222af4634056d830b5197ffd747726a9a1eee6da9f49074" 1765 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 1766 | "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" 1767 | "checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" 1768 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 1769 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 1770 | "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 1771 | "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" 1772 | "checksum rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae1b169243eaf61759b8475a998f0a385e42042370f3a7dbaf35246eacc8412" 1773 | "checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" 1774 | "checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" 1775 | "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 1776 | "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" 1777 | "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1778 | "checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" 1779 | "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1780 | "checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" 1781 | "checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" 1782 | "checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" 1783 | "checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" 1784 | "checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" 1785 | "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 1786 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 1787 | "checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" 1788 | "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" 1789 | "checksum remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" 1790 | "checksum reqwest 0.9.22 (registry+https://github.com/rust-lang/crates.io-index)" = "2c2064233e442ce85c77231ebd67d9eca395207dec2127fe0bbedde4bd29a650" 1791 | "checksum rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" 1792 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1793 | "checksum ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" 1794 | "checksum schannel 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "87f550b06b6cba9c8b8be3ee73f391990116bf527450d2556e9b9ce263b9a021" 1795 | "checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" 1796 | "checksum security-framework 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "301c862a6d0ee78f124c5e1710205965fc5c553100dcda6d98f13ef87a763f04" 1797 | "checksum security-framework-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e31493fc37615debb8c5090a7aeb4a9730bc61e77ab10b9af59f1a202284f895" 1798 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1799 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1800 | "checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" 1801 | "checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8" 1802 | "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" 1803 | "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" 1804 | "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1805 | "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" 1806 | "checksum snafu 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41207ca11f96a62cd34e6b7fdf73d322b25ae3848eb9d38302169724bb32cf27" 1807 | "checksum snafu-derive 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4c5e338c8b0577457c9dda8e794b6ad7231c96e25b1b0dd5842d52249020c1c0" 1808 | "checksum static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3" 1809 | "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" 1810 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 1811 | "checksum syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "661641ea2aa15845cddeb97dad000d22070bb5c1fb456b96c1cba883ec691e92" 1812 | "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" 1813 | "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" 1814 | "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" 1815 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 1816 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1817 | "checksum tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" 1818 | "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" 1819 | "checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" 1820 | "checksum tokio-executor 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" 1821 | "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" 1822 | "checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" 1823 | "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" 1824 | "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" 1825 | "checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" 1826 | "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" 1827 | "checksum toml 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01d1404644c8b12b16bfcffa4322403a91a451584daaaa7c28d3152e6cbc98cf" 1828 | "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" 1829 | "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" 1830 | "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1831 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1832 | "checksum unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" 1833 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1834 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 1835 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1836 | "checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" 1837 | "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" 1838 | "checksum vcpkg 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "33dd455d0f96e90a75803cfeb7f948768c08d70a6de9a8d2362461935698bf95" 1839 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1840 | "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 1841 | "checksum want 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" 1842 | "checksum wasi 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d" 1843 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1844 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 1845 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1846 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1847 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1848 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1849 | "checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" 1850 | "checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" 1851 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1852 | -------------------------------------------------------------------------------- /calculator-engine/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "calculator-engine" 3 | version = "0.1.0" 4 | authors = ["Alik Aslanyan "] 5 | edition = "2018" 6 | license = "GPL-3.0" 7 | 8 | [dependencies] 9 | nom = "5.0.1" 10 | arrayvec = "0.5.1" 11 | snafu = "0.6.0" 12 | derive_more = "0.99.2" 13 | itertools = "0.8.1" 14 | crossbeam = "0.7.3" 15 | clone_all = "0.1.1" 16 | log = "0.4.8" 17 | time = "0.1.42" 18 | cfg-if = "0.1.10" 19 | cranelift = { version = "0.51.0", optional = true } 20 | cranelift-module = { version = "0.51.0", optional = true } 21 | cranelift-simplejit = { version = "0.51.0", optional = true } 22 | inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "llvm8-0", optional = true } 23 | 24 | 25 | [features] 26 | llvm_jit = ["inkwell"] 27 | cranelift_jit = ["cranelift", "cranelift-module", "cranelift-simplejit"] 28 | default = ["cranelift_jit"] -------------------------------------------------------------------------------- /calculator-engine/src/ast.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use super::errors::Error; 25 | use super::parser::{parse, Operator, Token}; 26 | use log::*; 27 | use snafu::{OptionExt, Snafu}; 28 | use std::iter::Peekable; 29 | use std::vec::IntoIter as VecIter; 30 | use std::{fmt, fmt::Formatter}; 31 | 32 | #[derive(Clone, Debug)] 33 | pub enum Ast { 34 | Number(f64), 35 | BinaryOperator { 36 | operator: Operator, 37 | left: Box, 38 | right: Box, 39 | }, 40 | UnaryOperator { 41 | operator: Operator, 42 | child: Box, 43 | }, 44 | Parenthesis { 45 | child: Box, 46 | }, 47 | } 48 | 49 | impl std::fmt::Display for Ast { 50 | fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> { 51 | fn display(this: &Ast) -> String { 52 | match this { 53 | Ast::Number(n) => format!("{}", n), 54 | Ast::BinaryOperator { 55 | left, 56 | right, 57 | operator, 58 | } => format!("{} {} {}", left, operator, right), 59 | Ast::UnaryOperator { child, operator } => format!("{}{}", operator, child), 60 | Ast::Parenthesis { child } => format!("( {} )", child), 61 | } 62 | } 63 | 64 | write!(f, "{}", display(self)) 65 | } 66 | } 67 | 68 | #[derive(Snafu, Debug, Clone)] 69 | pub enum AstError { 70 | #[snafu(display("Expected next token, but got nothing"))] 71 | ExpectedToken, 72 | 73 | #[snafu(display("Expected operator, but got token: {:?}", token))] 74 | ExpectedOperator { token: Token }, 75 | 76 | #[snafu(display("Unsupported unary operator: {:?}", operator))] 77 | UnsupportedUnaryOperator { operator: Operator }, 78 | 79 | #[snafu(display("Unmatched closing parenthesis"))] 80 | UnmatchedClosingParenthesis, 81 | 82 | #[snafu(display( 83 | "Unmatched opening parenthesis, missing {} closing parenthesis", 84 | counter 85 | ))] 86 | UnmatchedOpeningParenthesis { counter: usize }, 87 | } 88 | 89 | pub struct AstBuilder { 90 | token_iter: Peekable>, 91 | } 92 | 93 | impl AstBuilder { 94 | pub fn build_ast(s: &str) -> Result { 95 | debug!("Starting to parse string {}", s); 96 | 97 | let (_, tokens) = parse(s).map_err(|err| match err { 98 | nom::Err::Failure(e) => e, 99 | nom::Err::Error(e) => e, 100 | _ => unimplemented!(), 101 | })?; 102 | 103 | debug!("Got tokens {:?}", tokens); 104 | 105 | AstBuilder { 106 | token_iter: tokens.into_iter().peekable(), 107 | } 108 | .expr(0) 109 | } 110 | 111 | pub fn build_ast_from_tokens(tokens: Vec) -> Result { 112 | AstBuilder { 113 | token_iter: tokens.into_iter().peekable(), 114 | } 115 | .expr(0) 116 | } 117 | 118 | fn nud(&mut self, t: Token) -> Result { 119 | match t { 120 | Token::Number(n) => Ok(Ast::Number(n)), 121 | Token::Operator(operator) => match operator { 122 | Operator::Plus | Operator::Minus => { 123 | let right = self.expr(0)?; 124 | 125 | Ok(Ast::UnaryOperator { 126 | child: Box::new(right), 127 | operator, 128 | }) 129 | } 130 | operator => Err(AstError::UnsupportedUnaryOperator { operator }.into()), 131 | }, 132 | Token::OpenParenthesis => { 133 | let mut parenthesis = Vec::new(); 134 | let mut counter: usize = 1; 135 | 136 | while let Some(token) = self.token_iter.next() { 137 | match &token { 138 | Token::OpenParenthesis => counter += 1, 139 | Token::CloseParenthesis => { 140 | match counter { 141 | 1 => { 142 | return AstBuilder::build_ast_from_tokens(parenthesis) 143 | .map(|t| Ast::Parenthesis { child: Box::new(t) }); 144 | } 145 | 0 => return Err(AstError::UnmatchedClosingParenthesis.into()), 146 | _ => {} 147 | }; 148 | counter -= 1; 149 | } 150 | _ => {} 151 | }; 152 | parenthesis.push(token); 153 | } 154 | 155 | if counter != 0 { 156 | Err(AstError::UnmatchedOpeningParenthesis { counter }.into()) 157 | } else { 158 | unreachable!() 159 | } 160 | } 161 | Token::CloseParenthesis => Err(AstError::UnmatchedClosingParenthesis.into()), 162 | } 163 | } 164 | 165 | fn led(&mut self, bp: usize, left: Ast, op: Token) -> Result { 166 | match op { 167 | Token::Operator(operator) => { 168 | let right = self.expr(bp)?; 169 | 170 | Ok(Ast::BinaryOperator { 171 | left: Box::new(left), 172 | right: Box::new(right), 173 | operator, 174 | }) 175 | } 176 | token => Err(AstError::ExpectedOperator { token }.into()), 177 | } 178 | } 179 | 180 | fn expr(&mut self, rbp: usize) -> Result { 181 | let first_token = self.token_iter.next().context(ExpectedToken)?; 182 | let mut left = self.nud(first_token)?; 183 | 184 | while let Some(peeked) = self.token_iter.peek() { 185 | if rbp >= peeked.precedence() { 186 | break; 187 | } 188 | 189 | let op = self.token_iter.next().unwrap(); 190 | left = self.led(op.precedence(), left, op)?; 191 | } 192 | 193 | Ok(left) 194 | } 195 | } 196 | 197 | pub fn build_ast(s: impl AsRef) -> Result { 198 | AstBuilder::build_ast(s.as_ref()) 199 | } 200 | 201 | #[cfg(test)] 202 | mod tests { 203 | use super::AstBuilder; 204 | 205 | fn test_expr(s: &str) { 206 | assert_eq!(s, format!("{}", AstBuilder::build_ast(s).unwrap())); 207 | } 208 | 209 | fn check_error_type(s: &str, error_str: &str) { 210 | assert_eq!( 211 | format!("{:?}", AstBuilder::build_ast(s).unwrap_err()), 212 | error_str 213 | ) 214 | } 215 | 216 | #[test] 217 | fn test_simple_expression() { 218 | test_expr("1 + 2 / 2 + 4"); 219 | test_expr("1 / 2 / 2 - 4"); 220 | test_expr("1 + 2 / 2 * 4"); 221 | } 222 | 223 | #[test] 224 | fn test_expression_parenthesis() { 225 | test_expr("( 2 + 2 ) * 2"); 226 | test_expr("2 * ( 2 + 2 )"); 227 | test_expr("1 * ( 2 * ( 3 * ( 4 * 5 ) ) )"); 228 | } 229 | 230 | #[test] 231 | fn check_failing() { 232 | check_error_type("b", "ParseError(Nom((\"b\", Many1)))"); 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /calculator-engine/src/errors.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use super::ast::AstError; 25 | use super::execution::interpret::InterpreterError; 26 | use super::execution::jit::JitError; 27 | use super::parser::ParseError; 28 | use derive_more::{Display, From}; 29 | 30 | #[derive(Debug, From, Display)] 31 | pub enum Error { 32 | ParseError(ParseError), 33 | AstError(AstError), 34 | InterpreterError(InterpreterError), 35 | JitError(JitError), 36 | } 37 | -------------------------------------------------------------------------------- /calculator-engine/src/execution/hybrid.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use super::interpret::Interpreter; 25 | use super::jit::Jit; 26 | pub use super::jit::JitOptimizationLevel; 27 | use crate::ast::{Ast, AstBuilder}; 28 | use crate::errors::Error; 29 | use clone_all::clone_all; 30 | use crossbeam::channel::{bounded, select}; 31 | use log::*; 32 | use std::sync::Arc; 33 | use std::thread; 34 | 35 | pub struct Hybrid {} 36 | 37 | impl Hybrid {} 38 | 39 | impl Hybrid { 40 | pub fn exec(s: &str, optimization_level: JitOptimizationLevel) -> Result { 41 | Hybrid::exec_ast(AstBuilder::build_ast(s)?, optimization_level) 42 | } 43 | 44 | pub fn exec_ast(ast: Ast, optimization_level: JitOptimizationLevel) -> Result { 45 | debug!("Starting to execute hybrid engine on AST"); 46 | 47 | let current_time = time::precise_time_s(); 48 | 49 | let ast = Arc::new(ast); 50 | 51 | let (first_send, first_receive) = bounded(1); 52 | let (second_send, second_receive) = bounded(1); 53 | 54 | let _ = thread::spawn({ 55 | clone_all!(ast); 56 | move || { 57 | first_send.send(Interpreter::exec_ast(&ast)).ok(); 58 | } 59 | }); 60 | 61 | let _ = thread::spawn({ 62 | clone_all!(ast); 63 | move || { 64 | second_send 65 | .send(Jit::exec_ast(&ast, optimization_level.into())) 66 | .ok(); 67 | } 68 | }); 69 | 70 | let result = select! { 71 | recv(first_receive) -> result => { 72 | debug!("Interpreter won: {:?}", result); 73 | result.unwrap() 74 | }, 75 | recv(second_receive) -> result => { 76 | debug!("JIT won: {:?}", result); 77 | result.unwrap() 78 | } 79 | }; 80 | 81 | debug!( 82 | "Hybrid exection finished in {} secs", 83 | time::precise_time_s() - current_time 84 | ); 85 | result 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /calculator-engine/src/execution/interpret.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use crate::ast::{Ast, AstBuilder}; 25 | use crate::errors::Error; 26 | use crate::parser::Operator; 27 | use log::*; 28 | use snafu::Snafu; 29 | 30 | #[derive(Snafu, Debug, Clone)] 31 | pub enum InterpreterError { 32 | #[snafu(display("Invalid unary operator {}", operator))] 33 | InvalidUnaryOperator { operator: Operator }, 34 | } 35 | 36 | pub struct Interpreter {} 37 | 38 | impl Interpreter { 39 | pub fn exec_ast(ast: &Ast) -> Result { 40 | debug!( 41 | "Starting to execute interpretation engine on AST: {:?}", 42 | ast 43 | ); 44 | 45 | Interpreter::_exec_ast(ast) 46 | } 47 | 48 | fn _exec_ast(ast: &Ast) -> Result { 49 | match ast { 50 | Ast::Number(n) => Ok(*n), 51 | Ast::UnaryOperator { operator, child } => { 52 | let result = Interpreter::_exec_ast(&child)?; 53 | 54 | match *operator { 55 | Operator::Plus => Ok(result), 56 | Operator::Minus => Ok(-result), 57 | operator => Err(InterpreterError::InvalidUnaryOperator { operator }.into()), 58 | } 59 | } 60 | Ast::BinaryOperator { 61 | operator, 62 | left, 63 | right, 64 | } => { 65 | let left = Interpreter::_exec_ast(&left)?; 66 | let right = Interpreter::_exec_ast(&right)?; 67 | 68 | Ok(match operator { 69 | Operator::Plus => left + right, 70 | Operator::Minus => left - right, 71 | Operator::Multiply => left * right, 72 | Operator::Divide => left / right, 73 | }) 74 | } 75 | Ast::Parenthesis { child } => Interpreter::_exec_ast(&child), 76 | } 77 | } 78 | 79 | pub fn exec(s: &str) -> Result { 80 | debug!("Starting to execute interpretation engine on string: {}", s); 81 | 82 | Interpreter::_exec_ast(&AstBuilder::build_ast(s)?) 83 | } 84 | } 85 | 86 | #[cfg(test)] 87 | mod tests { 88 | use super::Interpreter; 89 | 90 | #[test] 91 | fn test_simple_expression() { 92 | assert_eq!(Interpreter::exec("1 + 2").unwrap() as i32, 3); 93 | assert_eq!(Interpreter::exec("2 + 2 * 2").unwrap() as i32, 6); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /calculator-engine/src/execution/jit.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use crate::ast::{Ast, AstBuilder}; 25 | use crate::errors::Error; 26 | use crate::parser::Operator; 27 | use cfg_if::cfg_if; 28 | 29 | cfg_if! { 30 | if #[cfg(feature = "llvm_jit")] { 31 | use inkwell::{ 32 | builder::Builder, context::Context, execution_engine::ExecutionEngine, 33 | execution_engine::JitFunction, types::FloatType, values::FloatValue, OptimizationLevel, 34 | }; 35 | use derive_more::Constructor; 36 | } else if #[cfg(feature = "cranelift_jit")] { 37 | use cranelift::prelude::*; 38 | use cranelift_module::{Linkage, Module}; 39 | use cranelift_simplejit::{SimpleJITBackend, SimpleJITBuilder}; 40 | } 41 | } 42 | 43 | use log::*; 44 | use snafu::Snafu; 45 | 46 | #[derive(Clone, Copy, Debug)] 47 | pub enum JitOptimizationLevel { 48 | None, 49 | Less, 50 | Default, 51 | Aggressive, 52 | } 53 | 54 | #[cfg(feature = "llvm_jit")] 55 | impl Into for JitOptimizationLevel { 56 | fn into(self) -> OptimizationLevel { 57 | match self { 58 | JitOptimizationLevel::None => OptimizationLevel::None, 59 | JitOptimizationLevel::Less => OptimizationLevel::Less, 60 | JitOptimizationLevel::Default => OptimizationLevel::Default, 61 | JitOptimizationLevel::Aggressive => OptimizationLevel::Aggressive, 62 | } 63 | } 64 | } 65 | 66 | impl Default for JitOptimizationLevel { 67 | fn default() -> Self { 68 | JitOptimizationLevel::Default 69 | } 70 | } 71 | 72 | #[derive(Snafu, Debug)] 73 | pub enum JitError { 74 | #[snafu(display("JIT engine doesn't support unary operator: {}", operator))] 75 | UnsupportedUnaryOperator { operator: Operator }, 76 | } 77 | 78 | pub struct Jit {} 79 | 80 | type JitFunc = unsafe extern "C" fn() -> f64; 81 | 82 | impl Jit { 83 | pub fn exec(s: &str, optimization_level: JitOptimizationLevel) -> Result { 84 | debug!("Starting to execute JIT engine on string: {}", s); 85 | 86 | Jit::exec_ast(&AstBuilder::build_ast(s)?, optimization_level) 87 | } 88 | 89 | #[cfg(feature = "llvm_jit")] 90 | pub fn exec_ast(ast: &Ast, optimization_level: JitOptimizationLevel) -> Result { 91 | debug!("Starting to execute JIT engine on AST: {:?}", ast); 92 | 93 | ExecutionEngine::link_in_mc_jit(); 94 | 95 | let context = Context::create(); 96 | let module = context.create_module("calculator"); 97 | 98 | let builder = context.create_builder(); 99 | 100 | let execution_engine = module 101 | .create_jit_execution_engine(optimization_level.into()) 102 | .unwrap(); 103 | 104 | let f64_type = context.f64_type(); 105 | let fn_type = f64_type.fn_type(&[], false); 106 | 107 | let function = module.add_function("exec", fn_type, None); 108 | let basic_block = context.append_basic_block(function.clone(), "entry"); 109 | 110 | builder.position_at_end(&basic_block); 111 | 112 | #[derive(Constructor)] 113 | struct RecursiveBuilder<'a> { 114 | f64_type: FloatType<'a>, 115 | builder: &'a Builder<'a>, 116 | } 117 | 118 | impl<'a> RecursiveBuilder<'a> { 119 | pub fn build(&self, ast: &Ast) -> FloatValue { 120 | match ast { 121 | Ast::Number(n) => self.f64_type.const_float(*n), 122 | Ast::UnaryOperator { operator, child } => { 123 | let child = self.build(&child); 124 | match operator { 125 | Operator::Minus => child.const_neg(), 126 | Operator::Plus => child, 127 | _ => unreachable!(), 128 | } 129 | } 130 | Ast::BinaryOperator { 131 | operator, 132 | left, 133 | right, 134 | } => { 135 | let left = self.build(&left); 136 | let right = self.build(&right); 137 | 138 | match operator { 139 | Operator::Plus => { 140 | self.builder.build_float_add(left, right, "plus_temp") 141 | } 142 | Operator::Minus => { 143 | self.builder.build_float_sub(left, right, "minus_temp") 144 | } 145 | Operator::Divide => { 146 | self.builder.build_float_div(left, right, "divide_temp") 147 | } 148 | Operator::Multiply => { 149 | self.builder.build_float_mul(left, right, "multiply_temp") 150 | } 151 | } 152 | } 153 | Ast::Parenthesis { child } => self.build(&child), 154 | } 155 | } 156 | } 157 | 158 | let recursive_builder = RecursiveBuilder::new(f64_type, &builder); 159 | let return_value = recursive_builder.build(ast); 160 | builder.build_return(Some(&return_value)); 161 | 162 | debug!( 163 | "Generated LLVM IR: {}", 164 | function.print_to_string().to_string() 165 | ); 166 | 167 | unsafe { 168 | let jit_function: JitFunction = execution_engine.get_function("exec").unwrap(); 169 | 170 | Ok(jit_function.call()) 171 | } 172 | } 173 | 174 | #[cfg(feature = "cranelift_jit")] 175 | pub fn exec_ast(ast: &Ast, _: JitOptimizationLevel) -> Result { 176 | let builder = SimpleJITBuilder::new(cranelift_module::default_libcall_names()); 177 | let mut builder_context = FunctionBuilderContext::new(); 178 | let mut module: Module = Module::new(builder); 179 | let mut context = module.make_context(); 180 | 181 | context 182 | .func 183 | .signature 184 | .returns 185 | .push(AbiParam::new(types::F64)); 186 | 187 | let mut builder = FunctionBuilder::new(&mut context.func, &mut builder_context); 188 | let entry_ebb = builder.create_ebb(); 189 | 190 | builder.switch_to_block(entry_ebb); 191 | builder.seal_block(entry_ebb); 192 | 193 | fn build(builder: &mut FunctionBuilder<'_>, ast: &Ast) -> Value { 194 | match ast { 195 | Ast::Number(n) => builder.ins().f64const(*n), 196 | Ast::UnaryOperator { operator, child } => { 197 | let child = build(builder, &child); 198 | match operator { 199 | Operator::Minus => builder.ins().fneg(child), 200 | Operator::Plus => child, 201 | _ => unreachable!(), 202 | } 203 | } 204 | Ast::BinaryOperator { 205 | operator, 206 | left, 207 | right, 208 | } => { 209 | let left = build(builder, &left); 210 | let right = build(builder, &right); 211 | 212 | match operator { 213 | Operator::Plus => builder.ins().fadd(left, right), 214 | Operator::Minus => builder.ins().fsub(left, right), 215 | Operator::Divide => builder.ins().fdiv(left, right), 216 | Operator::Multiply => builder.ins().fmul(left, right), 217 | } 218 | } 219 | Ast::Parenthesis { child } => build(builder, &child), 220 | } 221 | } 222 | let return_value = build(&mut builder, ast); 223 | 224 | let return_variable = Variable::new(0); 225 | builder.declare_var(return_variable, types::F64); 226 | builder.def_var(return_variable, return_value); 227 | 228 | let return_var = [builder.use_var(return_variable)]; 229 | let _ = builder.ins().return_(&return_var); 230 | 231 | builder.finalize(); 232 | 233 | let function_id = module 234 | .declare_function("exec", Linkage::Export, &context.func.signature) 235 | .unwrap(); 236 | module.define_function(function_id, &mut context).unwrap(); 237 | module.clear_context(&mut context); 238 | module.finalize_definitions(); 239 | 240 | unsafe { 241 | let function: JitFunc = std::mem::transmute(module.get_finalized_function(function_id)); 242 | Ok((function)()) 243 | } 244 | } 245 | } 246 | -------------------------------------------------------------------------------- /calculator-engine/src/execution/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | pub mod hybrid; 25 | pub mod interpret; 26 | pub mod jit; 27 | -------------------------------------------------------------------------------- /calculator-engine/src/lib.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | #[allow(dead_code)] 25 | pub mod ast; 26 | mod errors; 27 | pub mod execution; 28 | pub mod parser; 29 | 30 | pub use errors::*; 31 | -------------------------------------------------------------------------------- /calculator-engine/src/parser/errors.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use nom::error::{ErrorKind as NomErrorKind, ErrorKind}; 25 | use std::fmt; 26 | 27 | type NomError = (I, NomErrorKind); 28 | 29 | use super::ParseUserError; 30 | use std::fmt::Formatter; 31 | 32 | #[derive(Debug, Clone, PartialEq)] 33 | pub enum ParseError { 34 | Nom(NomError), 35 | User(ParseUserError), 36 | } 37 | 38 | impl std::error::Error for ParseError {} 39 | 40 | impl fmt::Display for ParseError { 41 | fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> { 42 | match self { 43 | ParseError::User(u) => write!(f, "{}", u), 44 | ParseError::Nom((i, _)) => write!(f, "Parser error near token: {}", i), 45 | } 46 | } 47 | } 48 | 49 | impl From> for ParseError { 50 | fn from(err: NomError) -> Self { 51 | ParseError::Nom(err) 52 | } 53 | } 54 | 55 | impl From for ParseError { 56 | fn from(err: ParseUserError) -> Self { 57 | ParseError::User(err) 58 | } 59 | } 60 | 61 | impl<'a> From> for ParseError { 62 | fn from(err: ParseError<&'a str>) -> ParseError { 63 | match err { 64 | ParseError::User(err) => ParseError::User(err), 65 | ParseError::Nom((data, error_kind)) => ParseError::Nom((data.to_owned(), error_kind)), 66 | } 67 | } 68 | } 69 | 70 | impl nom::error::ParseError for ParseError { 71 | fn from_error_kind(input: I, kind: ErrorKind) -> Self { 72 | ParseError::Nom((input, kind)) 73 | } 74 | 75 | fn append(_: I, _: ErrorKind, other: Self) -> Self { 76 | other 77 | } 78 | } 79 | 80 | pub fn parse_error_to_owned<'a, I: ToOwned + ?Sized + 'a>( 81 | err: nom::Err>, 82 | ) -> nom::Err> { 83 | fn error_to_owned<'a, I: ToOwned + ?Sized + 'a>(err: ParseError<&I>) -> ParseError { 84 | match err { 85 | ParseError::User(err) => ParseError::User(err), 86 | ParseError::Nom((i, err)) => ParseError::Nom((i.to_owned(), err)), 87 | } 88 | } 89 | 90 | match err { 91 | nom::Err::Error(err) => nom::Err::Error(error_to_owned(err)), 92 | nom::Err::Failure(err) => nom::Err::Failure(error_to_owned(err)), 93 | nom::Err::Incomplete(n) => nom::Err::Incomplete(n), 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /calculator-engine/src/parser/mod.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | mod errors; 25 | pub use errors::*; 26 | 27 | use derive_more::From; 28 | use nom::{ 29 | branch::alt, 30 | bytes::complete::take, 31 | character::complete::{char, one_of}, 32 | combinator::map, 33 | multi::{fold_many1, many0}, 34 | number::complete::double, 35 | sequence::tuple, 36 | }; 37 | use snafu::Snafu; 38 | use std::fmt; 39 | use std::fmt::Formatter; 40 | 41 | type IResult<'a, O, E = ParseError<&'a str>> = nom::IResult<&'a str, O, E>; 42 | #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] 43 | pub enum Operator { 44 | Minus, 45 | Plus, 46 | Divide, 47 | Multiply, 48 | } 49 | 50 | impl Operator { 51 | pub fn precedence(self) -> usize { 52 | match self { 53 | Operator::Minus | Operator::Plus => 1, 54 | Operator::Divide | Operator::Multiply => 2, 55 | } 56 | } 57 | } 58 | 59 | impl std::fmt::Display for Operator { 60 | fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { 61 | write!( 62 | f, 63 | "{}", 64 | match self { 65 | Operator::Minus => '-', 66 | Operator::Plus => '+', 67 | Operator::Divide => '/', 68 | Operator::Multiply => '*', 69 | } 70 | ) 71 | } 72 | } 73 | 74 | #[derive(Clone, Debug)] 75 | pub enum Token { 76 | Number(f64), 77 | Operator(Operator), 78 | OpenParenthesis, 79 | CloseParenthesis, 80 | } 81 | impl Token { 82 | pub fn precedence(&self) -> usize { 83 | match self { 84 | Token::Operator(op) => op.precedence(), 85 | _ => usize::max_value(), 86 | } 87 | } 88 | } 89 | #[derive(Snafu, Debug, From, Clone, PartialEq)] 90 | pub enum ParseUserError { 91 | #[snafu(display("Invalid operator: {}", operator))] 92 | InvalidOperator { operator: char }, 93 | } 94 | fn parse_operator(s: &str) -> IResult { 95 | let (s, c) = take(1 as usize)(s)?; 96 | assert_eq!(c.len(), 1); 97 | Ok(( 98 | s, 99 | match c.chars().next().unwrap() { 100 | '+' => Ok(Operator::Plus), 101 | '-' => Ok(Operator::Minus), 102 | '*' => Ok(Operator::Multiply), 103 | '/' => Ok(Operator::Divide), 104 | operator => Err(nom::Err::Error( 105 | ParseUserError::InvalidOperator { operator }.into(), 106 | )), 107 | }?, 108 | )) 109 | } 110 | fn parse_number(s: &str) -> IResult { 111 | double(s) 112 | } 113 | fn skip_whitespace(s: &str) -> IResult<()> { 114 | Ok((many0(one_of(" \t\x0c\n"))(s)?.0, ())) 115 | } 116 | pub fn parse(s: &str) -> IResult, ParseError> { 117 | fold_many1( 118 | map( 119 | tuple(( 120 | skip_whitespace, 121 | alt(( 122 | map(parse_operator, Token::Operator), 123 | map(parse_number, Token::Number), 124 | map(char('('), |_| Token::OpenParenthesis), 125 | map(char(')'), |_| Token::CloseParenthesis), 126 | )), 127 | )), 128 | |((), token)| token, 129 | ), 130 | Vec::new(), 131 | |mut acc, token| { 132 | acc.push(token); 133 | acc 134 | }, 135 | )(s) 136 | .map_err(|e: nom::Err>| { 137 | let e: nom::Err = parse_error_to_owned(e); 138 | e 139 | }) 140 | } 141 | #[cfg(test)] 142 | mod tests { 143 | use super::*; 144 | #[test] 145 | fn test_skip_whitespace() { 146 | assert_eq!("bla b ", skip_whitespace(" bla b ").unwrap().0); 147 | assert_eq!("bla", skip_whitespace("bla").unwrap().0); 148 | } 149 | #[test] 150 | fn test_operator() { 151 | assert_eq!(Operator::Plus, parse_operator("+12").unwrap().1); 152 | assert_eq!(Operator::Minus, parse_operator("-").unwrap().1); 153 | assert_eq!(Operator::Multiply, parse_operator("*").unwrap().1); 154 | assert_eq!(Operator::Divide, parse_operator("/").unwrap().1); 155 | assert!(parse_operator("b").is_err()); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /calculator-gtk/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "calculator-gtk" 3 | version = "0.1.0" 4 | authors = ["Alik Aslanyan "] 5 | edition = "2018" 6 | license = "GPL-3.0" 7 | 8 | [dependencies] 9 | gtk = "0.7.0" 10 | relm = "0.18.0" 11 | relm-derive = "0.18.0" 12 | calculator-engine = { path = "../calculator-engine" } -------------------------------------------------------------------------------- /calculator-gtk/glade/main.glade: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | False 8 | 9 | 10 | 11 | 12 | 13 | True 14 | False 15 | vertical 16 | 2 17 | 18 | 19 | True 20 | True 21 | in 22 | 23 | 24 | True 25 | True 26 | char 27 | right 28 | 29 | 30 | 31 | 32 | False 33 | True 34 | 0 35 | 36 | 37 | 38 | 39 | True 40 | True 41 | char 42 | right 43 | 44 | 45 | False 46 | True 47 | 1 48 | 49 | 50 | 51 | 52 | True 53 | False 54 | 55 | 56 | True 57 | False 58 | vertical 59 | 60 | 61 | True 62 | False 63 | True 64 | True 65 | 66 | 67 | 1 68 | True 69 | True 70 | True 71 | 72 | 73 | 0 74 | 0 75 | 76 | 77 | 78 | 79 | 2 80 | True 81 | True 82 | True 83 | 84 | 85 | 1 86 | 0 87 | 88 | 89 | 90 | 91 | 4 92 | True 93 | True 94 | True 95 | 96 | 97 | 0 98 | 1 99 | 100 | 101 | 102 | 103 | 5 104 | True 105 | True 106 | True 107 | 108 | 109 | 1 110 | 1 111 | 112 | 113 | 114 | 115 | 6 116 | True 117 | True 118 | True 119 | 120 | 121 | 2 122 | 1 123 | 124 | 125 | 126 | 127 | 3 128 | True 129 | True 130 | True 131 | 132 | 133 | 2 134 | 0 135 | 136 | 137 | 138 | 139 | 9 140 | True 141 | True 142 | True 143 | 144 | 145 | 2 146 | 2 147 | 148 | 149 | 150 | 151 | 8 152 | True 153 | True 154 | True 155 | 156 | 157 | 1 158 | 2 159 | 160 | 161 | 162 | 163 | 7 164 | True 165 | True 166 | True 167 | 168 | 169 | 0 170 | 2 171 | 172 | 173 | 174 | 175 | True 176 | True 177 | 0 178 | 179 | 180 | 181 | 182 | 0 183 | True 184 | True 185 | True 186 | 187 | 188 | False 189 | True 190 | 1 191 | 192 | 193 | 194 | 195 | True 196 | True 197 | 0 198 | 199 | 200 | 201 | 202 | True 203 | False 204 | True 205 | True 206 | 207 | 208 | + 209 | True 210 | True 211 | True 212 | 213 | 214 | 0 215 | 0 216 | 217 | 218 | 219 | 220 | - 221 | True 222 | True 223 | True 224 | 225 | 226 | 1 227 | 0 228 | 229 | 230 | 231 | 232 | * 233 | True 234 | True 235 | True 236 | 237 | 238 | 0 239 | 1 240 | 241 | 242 | 243 | 244 | / 245 | True 246 | True 247 | True 248 | 249 | 250 | 1 251 | 1 252 | 253 | 254 | 255 | 256 | ) 257 | True 258 | True 259 | True 260 | 261 | 262 | 1 263 | 2 264 | 265 | 266 | 267 | 268 | ( 269 | True 270 | True 271 | True 272 | 273 | 274 | 0 275 | 2 276 | 277 | 278 | 279 | 280 | False 281 | True 282 | 1 283 | 284 | 285 | 286 | 287 | True 288 | True 289 | 2 290 | 291 | 292 | 293 | 294 | 295 | 296 | -------------------------------------------------------------------------------- /calculator-gtk/glade/main.glade~: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | False 8 | 9 | 10 | 11 | 12 | 13 | True 14 | False 15 | vertical 16 | 2 17 | 18 | 19 | True 20 | True 21 | in 22 | 23 | 24 | True 25 | True 26 | char 27 | right 28 | 29 | 30 | 31 | 32 | False 33 | True 34 | 0 35 | 36 | 37 | 38 | 39 | True 40 | True 41 | char 42 | right 43 | 44 | 45 | False 46 | True 47 | 1 48 | 49 | 50 | 51 | 52 | True 53 | False 54 | 55 | 56 | True 57 | False 58 | vertical 59 | 60 | 61 | True 62 | False 63 | True 64 | True 65 | 66 | 67 | 1 68 | True 69 | True 70 | True 71 | 72 | 73 | 0 74 | 0 75 | 76 | 77 | 78 | 79 | 2 80 | True 81 | True 82 | True 83 | 84 | 85 | 1 86 | 0 87 | 88 | 89 | 90 | 91 | 4 92 | True 93 | True 94 | True 95 | 96 | 97 | 0 98 | 1 99 | 100 | 101 | 102 | 103 | 5 104 | True 105 | True 106 | True 107 | 108 | 109 | 1 110 | 1 111 | 112 | 113 | 114 | 115 | 6 116 | True 117 | True 118 | True 119 | 120 | 121 | 2 122 | 1 123 | 124 | 125 | 126 | 127 | 3 128 | True 129 | True 130 | True 131 | 132 | 133 | 2 134 | 0 135 | 136 | 137 | 138 | 139 | 9 140 | True 141 | True 142 | True 143 | 144 | 145 | 2 146 | 2 147 | 148 | 149 | 150 | 151 | 8 152 | True 153 | True 154 | True 155 | 156 | 157 | 1 158 | 2 159 | 160 | 161 | 162 | 163 | 7 164 | True 165 | True 166 | True 167 | 168 | 169 | 0 170 | 2 171 | 172 | 173 | 174 | 175 | True 176 | True 177 | 0 178 | 179 | 180 | 181 | 182 | 0 183 | True 184 | True 185 | True 186 | 187 | 188 | False 189 | True 190 | 1 191 | 192 | 193 | 194 | 195 | True 196 | True 197 | 0 198 | 199 | 200 | 201 | 202 | True 203 | False 204 | True 205 | True 206 | 207 | 208 | + 209 | True 210 | True 211 | True 212 | 213 | 214 | 0 215 | 0 216 | 217 | 218 | 219 | 220 | - 221 | True 222 | True 223 | True 224 | 225 | 226 | 1 227 | 0 228 | 229 | 230 | 231 | 232 | * 233 | True 234 | True 235 | True 236 | 237 | 238 | 0 239 | 1 240 | 241 | 242 | 243 | 244 | / 245 | True 246 | True 247 | True 248 | 249 | 250 | 1 251 | 1 252 | 253 | 254 | 255 | 256 | False 257 | True 258 | 1 259 | 260 | 261 | 262 | 263 | True 264 | True 265 | 2 266 | 267 | 268 | 269 | 270 | 271 | 272 | -------------------------------------------------------------------------------- /calculator-gtk/src/main.rs: -------------------------------------------------------------------------------- 1 | /* 2 | * Calculator 3 | * Copyright (c) 2019 Alik Aslanyan 4 | * 5 | * 6 | * This file is part of Calculator. 7 | * 8 | * Calculator is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by the 10 | * Free Software Foundation; either version 3 of the License, or (at 11 | * your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 | * 22 | */ 23 | 24 | use calculator_engine::{ 25 | execution::hybrid::{Hybrid, JitOptimizationLevel}, 26 | parser::Operator, 27 | }; 28 | 29 | use gtk::{ 30 | ApplicationWindow, BuilderExtManual, Button, ButtonExt, Inhibit, TextBufferExt, TextView, 31 | TextViewExt, WidgetExt, 32 | }; 33 | use relm::{connect, Relm, Update, Widget}; 34 | use relm_derive::Msg; 35 | 36 | #[derive(Msg)] 37 | enum Msg { 38 | AddNumber(usize), 39 | AddOperator(Operator), 40 | AddText(&'static str), 41 | DoCalculation, 42 | Quit, 43 | } 44 | 45 | struct Widgets { 46 | window: ApplicationWindow, 47 | text_view_top: TextView, 48 | text_view_bottom: TextView, 49 | } 50 | 51 | struct Window { 52 | widgets: Widgets, 53 | } 54 | 55 | impl Update for Window { 56 | type Model = (); 57 | type ModelParam = (); 58 | type Msg = Msg; 59 | 60 | fn model(_: &Relm, _: Self::ModelParam) -> Self::Model {} 61 | 62 | fn update(&mut self, event: Self::Msg) { 63 | let top_buffer = self.widgets.text_view_top.get_buffer().unwrap(); 64 | 65 | match event { 66 | Msg::AddNumber(n) => top_buffer.insert_at_cursor(&n.to_string()), 67 | Msg::AddOperator(operator) => top_buffer.insert_at_cursor(match operator { 68 | Operator::Plus => " + ", 69 | Operator::Minus => " - ", 70 | Operator::Divide => " / ", 71 | Operator::Multiply => " * ", 72 | }), 73 | Msg::DoCalculation => {} 74 | Msg::AddText(text) => top_buffer.insert_at_cursor(text), 75 | Msg::Quit => gtk::main_quit(), 76 | } 77 | 78 | self.widgets 79 | .text_view_bottom 80 | .get_buffer() 81 | .unwrap() 82 | .set_text(&match Hybrid::exec( 83 | &top_buffer 84 | .get_text( 85 | &top_buffer.get_start_iter(), 86 | &top_buffer.get_end_iter(), 87 | false, 88 | ) 89 | .unwrap() 90 | .to_string(), 91 | JitOptimizationLevel::None, 92 | ) { 93 | Ok(result) => result.to_string(), 94 | Err(_) => "".to_owned(), 95 | }); 96 | } 97 | } 98 | 99 | impl Widget for Window { 100 | type Root = ApplicationWindow; 101 | 102 | fn root(&self) -> Self::Root { 103 | self.widgets.window.clone() 104 | } 105 | 106 | fn view(relm: &Relm, _: Self::Model) -> Self { 107 | let glade_src = include_str!("../glade/main.glade"); 108 | let builder = gtk::Builder::new_from_string(glade_src); 109 | 110 | let window: ApplicationWindow = builder.get_object("main_window").unwrap(); 111 | 112 | let text_view_top: TextView = builder.get_object("text_view_top").unwrap(); 113 | 114 | connect!( 115 | relm, 116 | text_view_top.get_buffer().unwrap(), 117 | connect_changed(_), 118 | Msg::DoCalculation 119 | ); 120 | 121 | for name in ["add", "sub", "div", "mul"].into_iter() { 122 | let operator = match *name { 123 | "add" => Operator::Plus, 124 | "sub" => Operator::Minus, 125 | "div" => Operator::Divide, 126 | "mul" => Operator::Multiply, 127 | _ => unreachable!(), 128 | }; 129 | connect!( 130 | relm, 131 | builder 132 | .get_object::