├── .circleci └── config.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── ramp.yml ├── src └── lib.rs └── test └── pytest ├── Makefile ├── __init__.py ├── requirements.txt └── test.py /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | jobs: 4 | build: 5 | docker: 6 | - image: circleci/rust:buster 7 | 8 | steps: 9 | - checkout 10 | - run: git submodule sync 11 | - run: git submodule update --init 12 | - run: rustup default nightly 13 | 14 | - run: 15 | name: Install prerequisite 16 | command: | 17 | sudo apt-get install -y software-properties-common 18 | sudo add-apt-repository -y ppa:chris-lea/redis-server 19 | sudo apt-get install -y clang llvm cmake python-pip redis-server awscli 20 | pip install 'ramp-packer==1.9.0' 21 | 22 | - run: 23 | name: Version information 24 | command: rustc --version; cargo --version; rustup --version 25 | 26 | - restore_cache: 27 | keys: 28 | - v2-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }} 29 | # fallback to using the latest cache if no exact match is found 30 | - v2-dependencies- 31 | # - run: 32 | # name: Check formatting 33 | # command: | 34 | # rustfmt --version 35 | # cargo fmt -- --write-mode=diff 36 | 37 | - run: 38 | name: Build all targets 39 | command: cargo build --all --all-targets 40 | 41 | # - run: 42 | # name: Nightly Build 43 | # command: | 44 | # rustup run nightly rustc --version --verbose 45 | # rustup run nightly cargo --version --verbose 46 | # rustup run nightly cargo build 47 | # - run: 48 | # name: Stable Build 49 | # command: | 50 | # rustup run stable rustc --version --verbose 51 | # rustup run stable cargo --version --verbose 52 | # rustup run stable cargo build 53 | - run: 54 | name: Test 55 | command: | 56 | pip install -r ./test/pytest/requirements.txt 57 | python ./test/pytest/test.py 58 | 59 | # - run: 60 | # name: Package 61 | # command: | 62 | # cargo build --all --all-targets --release 63 | # ramp pack -m ramp.yml -o ./target/release/$PACKAGE_NAME.{os}-{architecture}.$CIRCLE_BRANCH.zip ./target/release/$MODULE_ARTIFACT 64 | 65 | # - run: 66 | # name: Upload Coverage 67 | # command: ./scripts/codecov.sh 68 | 69 | - save_cache: 70 | key: v2-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }} 71 | paths: 72 | - "~/.cargo" 73 | - "./target" 74 | 75 | # - run: 76 | # name: Deploy to S3 77 | # command: >- 78 | # aws s3 cp ./target/release/ s3://redismodules/$PACKAGE_NAME/ --acl 79 | # public-read --recursive --exclude "*" --include "*.zip" 80 | 81 | # - run: 82 | # name: Run all tests 83 | # command: cargo test --all 84 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # These are backup files generated by rustfmt 6 | **/*.rs.bk 7 | .idea 8 | .project 9 | .vscode/* 10 | *.pyc 11 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "aho-corasick" 5 | version = "0.7.6" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | dependencies = [ 8 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 9 | ] 10 | 11 | [[package]] 12 | name = "ansi_term" 13 | version = "0.11.0" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | dependencies = [ 16 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 17 | ] 18 | 19 | [[package]] 20 | name = "atty" 21 | version = "0.2.13" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | dependencies = [ 24 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 25 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 26 | ] 27 | 28 | [[package]] 29 | name = "autocfg" 30 | version = "0.1.7" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | 33 | [[package]] 34 | name = "base64" 35 | version = "0.9.3" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | dependencies = [ 38 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 39 | "safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 40 | ] 41 | 42 | [[package]] 43 | name = "base64" 44 | version = "0.10.1" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | dependencies = [ 47 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 48 | ] 49 | 50 | [[package]] 51 | name = "bindgen" 52 | version = "0.51.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | dependencies = [ 55 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 56 | "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", 57 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 58 | "clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)", 59 | "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", 60 | "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 61 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 62 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 63 | "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 64 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 65 | "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 66 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 67 | "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 68 | "shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 69 | "which 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 70 | ] 71 | 72 | [[package]] 73 | name = "bitflags" 74 | version = "1.2.1" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | 77 | [[package]] 78 | name = "byteorder" 79 | version = "1.3.2" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | 82 | [[package]] 83 | name = "cc" 84 | version = "1.0.46" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | 87 | [[package]] 88 | name = "cexpr" 89 | version = "0.3.5" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | dependencies = [ 92 | "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 93 | ] 94 | 95 | [[package]] 96 | name = "cfg-if" 97 | version = "0.1.10" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | 100 | [[package]] 101 | name = "clang-sys" 102 | version = "0.28.1" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | dependencies = [ 105 | "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 106 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 107 | "libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", 108 | ] 109 | 110 | [[package]] 111 | name = "clap" 112 | version = "2.33.0" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | dependencies = [ 115 | "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 116 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 117 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 118 | "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 119 | "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 120 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 121 | "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 122 | ] 123 | 124 | [[package]] 125 | name = "cookie" 126 | version = "0.11.1" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | dependencies = [ 129 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 130 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 131 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 132 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 133 | ] 134 | 135 | [[package]] 136 | name = "devise" 137 | version = "0.2.0" 138 | source = "registry+https://github.com/rust-lang/crates.io-index" 139 | dependencies = [ 140 | "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 141 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 142 | ] 143 | 144 | [[package]] 145 | name = "devise_codegen" 146 | version = "0.2.0" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | dependencies = [ 149 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 150 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 151 | ] 152 | 153 | [[package]] 154 | name = "devise_core" 155 | version = "0.2.0" 156 | source = "registry+https://github.com/rust-lang/crates.io-index" 157 | dependencies = [ 158 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 159 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 160 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 161 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 162 | ] 163 | 164 | [[package]] 165 | name = "enum-primitive-derive" 166 | version = "0.1.2" 167 | source = "registry+https://github.com/rust-lang/crates.io-index" 168 | dependencies = [ 169 | "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", 170 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 171 | "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 172 | ] 173 | 174 | [[package]] 175 | name = "env_logger" 176 | version = "0.6.2" 177 | source = "registry+https://github.com/rust-lang/crates.io-index" 178 | dependencies = [ 179 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 180 | "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 181 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 182 | "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 183 | "termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 184 | ] 185 | 186 | [[package]] 187 | name = "glob" 188 | version = "0.3.0" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | 191 | [[package]] 192 | name = "httparse" 193 | version = "1.3.4" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | 196 | [[package]] 197 | name = "humantime" 198 | version = "1.3.0" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | dependencies = [ 201 | "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 202 | ] 203 | 204 | [[package]] 205 | name = "hyper" 206 | version = "0.10.16" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | dependencies = [ 209 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 210 | "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 211 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 212 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 213 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 214 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 215 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 216 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 217 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 218 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 219 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 220 | ] 221 | 222 | [[package]] 223 | name = "idna" 224 | version = "0.1.5" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | dependencies = [ 227 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 228 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 229 | "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 230 | ] 231 | 232 | [[package]] 233 | name = "indexmap" 234 | version = "1.3.0" 235 | source = "registry+https://github.com/rust-lang/crates.io-index" 236 | dependencies = [ 237 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 238 | ] 239 | 240 | [[package]] 241 | name = "language-tags" 242 | version = "0.2.2" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | 245 | [[package]] 246 | name = "lazy_static" 247 | version = "1.4.0" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | 250 | [[package]] 251 | name = "libc" 252 | version = "0.2.65" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | 255 | [[package]] 256 | name = "libloading" 257 | version = "0.5.2" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | dependencies = [ 260 | "cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", 261 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 262 | ] 263 | 264 | [[package]] 265 | name = "log" 266 | version = "0.3.9" 267 | source = "registry+https://github.com/rust-lang/crates.io-index" 268 | dependencies = [ 269 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 270 | ] 271 | 272 | [[package]] 273 | name = "log" 274 | version = "0.4.8" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | dependencies = [ 277 | "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 278 | ] 279 | 280 | [[package]] 281 | name = "matches" 282 | version = "0.1.8" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | 285 | [[package]] 286 | name = "memchr" 287 | version = "2.2.1" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | 290 | [[package]] 291 | name = "mime" 292 | version = "0.2.6" 293 | source = "registry+https://github.com/rust-lang/crates.io-index" 294 | dependencies = [ 295 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 296 | ] 297 | 298 | [[package]] 299 | name = "nom" 300 | version = "4.2.3" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | dependencies = [ 303 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 304 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 305 | ] 306 | 307 | [[package]] 308 | name = "num-traits" 309 | version = "0.1.43" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | dependencies = [ 312 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 313 | ] 314 | 315 | [[package]] 316 | name = "num-traits" 317 | version = "0.2.8" 318 | source = "registry+https://github.com/rust-lang/crates.io-index" 319 | dependencies = [ 320 | "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 321 | ] 322 | 323 | [[package]] 324 | name = "num_cpus" 325 | version = "1.10.1" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | dependencies = [ 328 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 329 | ] 330 | 331 | [[package]] 332 | name = "pear" 333 | version = "0.1.2" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | dependencies = [ 336 | "pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 337 | ] 338 | 339 | [[package]] 340 | name = "pear_codegen" 341 | version = "0.1.2" 342 | source = "registry+https://github.com/rust-lang/crates.io-index" 343 | dependencies = [ 344 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 345 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 346 | "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", 347 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 348 | "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 349 | ] 350 | 351 | [[package]] 352 | name = "peeking_take_while" 353 | version = "0.1.2" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | 356 | [[package]] 357 | name = "percent-encoding" 358 | version = "1.0.1" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | 361 | [[package]] 362 | name = "proc-macro2" 363 | version = "0.4.30" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | dependencies = [ 366 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 367 | ] 368 | 369 | [[package]] 370 | name = "proc-macro2" 371 | version = "1.0.6" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | dependencies = [ 374 | "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 375 | ] 376 | 377 | [[package]] 378 | name = "quick-error" 379 | version = "1.2.2" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | 382 | [[package]] 383 | name = "quote" 384 | version = "0.3.15" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | 387 | [[package]] 388 | name = "quote" 389 | version = "0.6.13" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | dependencies = [ 392 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 393 | ] 394 | 395 | [[package]] 396 | name = "quote" 397 | version = "1.0.2" 398 | source = "registry+https://github.com/rust-lang/crates.io-index" 399 | dependencies = [ 400 | "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 401 | ] 402 | 403 | [[package]] 404 | name = "redis-module" 405 | version = "0.5.0" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | dependencies = [ 408 | "bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)", 409 | "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 410 | "cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", 411 | "enum-primitive-derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 413 | "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 414 | ] 415 | 416 | [[package]] 417 | name = "redisrest" 418 | version = "0.1.0" 419 | dependencies = [ 420 | "redis-module 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 421 | "rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 422 | ] 423 | 424 | [[package]] 425 | name = "redox_syscall" 426 | version = "0.1.56" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | 429 | [[package]] 430 | name = "regex" 431 | version = "1.3.1" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | dependencies = [ 434 | "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", 435 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 436 | "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", 437 | "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 438 | ] 439 | 440 | [[package]] 441 | name = "regex-syntax" 442 | version = "0.6.12" 443 | source = "registry+https://github.com/rust-lang/crates.io-index" 444 | 445 | [[package]] 446 | name = "ring" 447 | version = "0.13.5" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | dependencies = [ 450 | "cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)", 451 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 452 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 454 | ] 455 | 456 | [[package]] 457 | name = "rocket" 458 | version = "0.4.2" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | dependencies = [ 461 | "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", 462 | "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 463 | "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", 464 | "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 465 | "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", 466 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 467 | "rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 468 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 469 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 470 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 471 | "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 472 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 473 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 474 | ] 475 | 476 | [[package]] 477 | name = "rocket_codegen" 478 | version = "0.4.2" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | dependencies = [ 481 | "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 482 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 483 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 484 | "rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 485 | "version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 486 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 487 | ] 488 | 489 | [[package]] 490 | name = "rocket_http" 491 | version = "0.4.2" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | dependencies = [ 494 | "cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", 495 | "hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)", 496 | "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 497 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 498 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 499 | "smallvec 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 500 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 501 | "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", 502 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 503 | ] 504 | 505 | [[package]] 506 | name = "rustc-hash" 507 | version = "1.0.1" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | dependencies = [ 510 | "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 511 | ] 512 | 513 | [[package]] 514 | name = "safemem" 515 | version = "0.3.3" 516 | source = "registry+https://github.com/rust-lang/crates.io-index" 517 | 518 | [[package]] 519 | name = "serde" 520 | version = "1.0.102" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | 523 | [[package]] 524 | name = "shlex" 525 | version = "0.1.1" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | 528 | [[package]] 529 | name = "smallvec" 530 | version = "0.6.11" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | 533 | [[package]] 534 | name = "state" 535 | version = "0.4.1" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | 538 | [[package]] 539 | name = "strsim" 540 | version = "0.8.0" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | 543 | [[package]] 544 | name = "syn" 545 | version = "0.11.11" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | dependencies = [ 548 | "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 549 | "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 550 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 551 | ] 552 | 553 | [[package]] 554 | name = "syn" 555 | version = "0.15.44" 556 | source = "registry+https://github.com/rust-lang/crates.io-index" 557 | dependencies = [ 558 | "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", 559 | "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", 560 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 561 | ] 562 | 563 | [[package]] 564 | name = "synom" 565 | version = "0.11.3" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | dependencies = [ 568 | "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 569 | ] 570 | 571 | [[package]] 572 | name = "termcolor" 573 | version = "1.0.5" 574 | source = "registry+https://github.com/rust-lang/crates.io-index" 575 | dependencies = [ 576 | "wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 577 | ] 578 | 579 | [[package]] 580 | name = "textwrap" 581 | version = "0.11.0" 582 | source = "registry+https://github.com/rust-lang/crates.io-index" 583 | dependencies = [ 584 | "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 585 | ] 586 | 587 | [[package]] 588 | name = "thread_local" 589 | version = "0.3.6" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | dependencies = [ 592 | "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 593 | ] 594 | 595 | [[package]] 596 | name = "time" 597 | version = "0.1.42" 598 | source = "registry+https://github.com/rust-lang/crates.io-index" 599 | dependencies = [ 600 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 601 | "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", 602 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 603 | ] 604 | 605 | [[package]] 606 | name = "toml" 607 | version = "0.4.10" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | dependencies = [ 610 | "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", 611 | ] 612 | 613 | [[package]] 614 | name = "traitobject" 615 | version = "0.1.0" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | 618 | [[package]] 619 | name = "typeable" 620 | version = "0.1.2" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | 623 | [[package]] 624 | name = "unicase" 625 | version = "1.4.2" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | dependencies = [ 628 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 629 | ] 630 | 631 | [[package]] 632 | name = "unicode-bidi" 633 | version = "0.3.4" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | dependencies = [ 636 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 637 | ] 638 | 639 | [[package]] 640 | name = "unicode-normalization" 641 | version = "0.1.8" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | dependencies = [ 644 | "smallvec 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)", 645 | ] 646 | 647 | [[package]] 648 | name = "unicode-width" 649 | version = "0.1.6" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | 652 | [[package]] 653 | name = "unicode-xid" 654 | version = "0.0.4" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | 657 | [[package]] 658 | name = "unicode-xid" 659 | version = "0.1.0" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | 662 | [[package]] 663 | name = "unicode-xid" 664 | version = "0.2.0" 665 | source = "registry+https://github.com/rust-lang/crates.io-index" 666 | 667 | [[package]] 668 | name = "untrusted" 669 | version = "0.6.2" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | 672 | [[package]] 673 | name = "url" 674 | version = "1.7.2" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | dependencies = [ 677 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 678 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 679 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 680 | ] 681 | 682 | [[package]] 683 | name = "vec_map" 684 | version = "0.8.1" 685 | source = "registry+https://github.com/rust-lang/crates.io-index" 686 | 687 | [[package]] 688 | name = "version_check" 689 | version = "0.1.5" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | 692 | [[package]] 693 | name = "version_check" 694 | version = "0.9.1" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | 697 | [[package]] 698 | name = "which" 699 | version = "3.0.0" 700 | source = "registry+https://github.com/rust-lang/crates.io-index" 701 | dependencies = [ 702 | "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", 703 | ] 704 | 705 | [[package]] 706 | name = "winapi" 707 | version = "0.3.8" 708 | source = "registry+https://github.com/rust-lang/crates.io-index" 709 | dependencies = [ 710 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 711 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 712 | ] 713 | 714 | [[package]] 715 | name = "winapi-i686-pc-windows-gnu" 716 | version = "0.4.0" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | 719 | [[package]] 720 | name = "winapi-util" 721 | version = "0.1.2" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | dependencies = [ 724 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 725 | ] 726 | 727 | [[package]] 728 | name = "winapi-x86_64-pc-windows-gnu" 729 | version = "0.4.0" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | 732 | [[package]] 733 | name = "wincolor" 734 | version = "1.0.2" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | dependencies = [ 737 | "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", 738 | "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 739 | ] 740 | 741 | [[package]] 742 | name = "yansi" 743 | version = "0.4.0" 744 | source = "registry+https://github.com/rust-lang/crates.io-index" 745 | 746 | [[package]] 747 | name = "yansi" 748 | version = "0.5.0" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | 751 | [metadata] 752 | "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" 753 | "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 754 | "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" 755 | "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 756 | "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 757 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 758 | "checksum bindgen 0.51.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ebd71393f1ec0509b553aa012b9b58e81dadbdff7130bd3b8cba576e69b32f75" 759 | "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 760 | "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" 761 | "checksum cc 1.0.46 (registry+https://github.com/rust-lang/crates.io-index)" = "0213d356d3c4ea2c18c40b037c3be23cd639825c18f25ee670ac7813beeef99c" 762 | "checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" 763 | "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 764 | "checksum clang-sys 0.28.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81de550971c976f176130da4b2978d3b524eaa0fd9ac31f3ceb5ae1231fb4853" 765 | "checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 766 | "checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0" 767 | "checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" 768 | "checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" 769 | "checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" 770 | "checksum enum-primitive-derive 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b90e520ec62c1864c8c78d637acbfe8baf5f63240f2fb8165b8325c07812dd" 771 | "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" 772 | "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 773 | "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" 774 | "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" 775 | "checksum hyper 0.10.16 (registry+https://github.com/rust-lang/crates.io-index)" = "0a0652d9a2609a968c14be1a9ea00bf4b1d64e2e1f53a1b51b6fff3a6e829273" 776 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 777 | "checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 778 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 779 | "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 780 | "checksum libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)" = "1a31a0627fdf1f6a39ec0dd577e101440b7db22672c0901fe00a9a6fbb5c24e8" 781 | "checksum libloading 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" 782 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 783 | "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 784 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 785 | "checksum memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "88579771288728879b57485cc7d6b07d648c9f0141eb955f8ab7f9d45394468e" 786 | "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" 787 | "checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" 788 | "checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 789 | "checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" 790 | "checksum num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bcef43580c035376c0705c42792c294b66974abbfd2789b511784023f71f3273" 791 | "checksum pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c26d2b92e47063ffce70d3e3b1bd097af121a9e0db07ca38a6cc1cf0cc85ff25" 792 | "checksum pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "336db4a192cc7f54efeb0c4e11a9245394824cc3bcbd37ba3ff51240c35d7a6e" 793 | "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 794 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 795 | "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 796 | "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" 797 | "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 798 | "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" 799 | "checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" 800 | "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" 801 | "checksum redis-module 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6ca9c71cbef122d7a418a72f87dcaeb24cf3c2227f5b27c3bc55776c1c31d02a" 802 | "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" 803 | "checksum regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dc220bd33bdce8f093101afe22a037b8eb0e5af33592e6a9caafff0d4cb81cbd" 804 | "checksum regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "11a7e20d1cce64ef2fed88b66d347f88bd9babb82845b2b858f3edbf59a4f716" 805 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 806 | "checksum rocket 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "42c1e9deb3ef4fa430d307bfccd4231434b707ca1328fae339c43ad1201cc6f7" 807 | "checksum rocket_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "79aa1366f9b2eccddc05971e17c5de7bb75a5431eb12c2b5c66545fd348647f4" 808 | "checksum rocket_http 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b1391457ee4e80b40d4b57fa5765c0f2836b20d73bcbee4e3f35d93cf3b80817" 809 | "checksum rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7540fc8b0c49f096ee9c961cda096467dce8084bec6bdca2fc83895fd9b28cb8" 810 | "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" 811 | "checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" 812 | "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" 813 | "checksum smallvec 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cefaa50e76a6f10b86f36e640eb1739eafbd4084865067778463913e43a77ff3" 814 | "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" 815 | "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 816 | "checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" 817 | "checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" 818 | "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" 819 | "checksum termcolor 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "96d6098003bde162e4277c70665bd87c326f5a0c3f3fbfb285787fa482d54e6e" 820 | "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 821 | "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" 822 | "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 823 | "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 824 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 825 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 826 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 827 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 828 | "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" 829 | "checksum unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7007dbd421b92cc6e28410fe7362e2e0a2503394908f417b68ec8d1c364c4e20" 830 | "checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" 831 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 832 | "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 833 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 834 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 835 | "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 836 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 837 | "checksum version_check 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" 838 | "checksum which 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "240a31163872f7e8e49f35b42b58485e35355b07eb009d9f3686733541339a69" 839 | "checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 840 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 841 | "checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 842 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 843 | "checksum wincolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96f5016b18804d24db43cebf3c77269e7569b8954a8464501c216cc5e070eaa9" 844 | "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" 845 | "checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 846 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "redisrest" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | [lib] 7 | crate-type = ["cdylib"] 8 | 9 | [dependencies] 10 | rocket = "0.4.2" 11 | redis-module = { version="0.5.0", features = ["experimental-api"]} 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | REDIS SOURCE AVAILABLE LICENSE AGREEMENT 2 | 3 | Version 1, February 21, 2019 4 | 5 | This Agreement sets forth the terms on which the Licensor makes available the Software. BY INSTALLING, DOWNLOADING, ACCESSING, USING OR DISTRIBUTING ANY OF THE SOFTWARE, YOU AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO SUCH TERMS AND CONDITIONS, YOU MUST NOT USE THE SOFTWARE. If you are receiving the Software on behalf of a legal entity, you represent and warrant that you have the actual authority to agree to the terms and conditions of this agreement on behalf of such entity. 6 | 7 | 8 | 0. DEFINITIONS 9 | 10 | The terms below have the meanings set forth below for purposes of this Agreement: 11 | 12 | Agreement: this Redis Source Available License Agreement. 13 | 14 | Database Product: any of the following products or services: (a) database; (b) caching engine; (c) stream processing engine; (d) search engine; (e) indexing engine; (f) machine learning or deep learning or artificial intelligence serving engine; 15 | (g) a product or service exposing the Redis API; (h) a product or service exposing the Redis Modules API; or 16 | (i) a product or service exposing the Software API. 17 | 18 | License: the Redis Source Available License described in Section 1. 19 | 20 | Licensor: Redis Labs Ltd. 21 | 22 | Modification: a modification of the Software made by You under the License, Section 1.1(c). 23 | 24 | Redis: the open source Redis software as described in redis.io. 25 | 26 | Software: certain software components designed to work with Redis and provided to you under this Agreement. 27 | 28 | You: the recipient of this Software, an individual, or the entity on whose behalf you are receiving the Software. 29 | 30 | Your Application: an application developed by or for You, where such application is not a Database Product. 31 | 32 | 1. LICENSE GRANT AND CONDITIONS 33 | 34 | 1.1 Subject to the terms and conditions of this Section 1, Licensor hereby grants to You a non-exclusive, royalty-free, worldwide, non-transferable license during the term of this Agreement to: 35 | (a) distribute or make available the Software or your Modifications under the terms of this Agreement, only as part of Your Application, so long as you include the following notice on any copy you distribute: "This software is subject to the terms of the Redis Source Available License Agreement". 36 | (b) use the Software, or your Modifications, only as part of Your Application, but not in connection with any Database Product that is distributed or otherwise made available by any third party. 37 | (c) modify the Software, provided that Modifications remain subject to the terms of this License. 38 | (d) reproduce the Software as necessary for the above. 39 | 40 | 1.2. Sublicensing. You may sublicense the right to use the Software fully embedded in Your Application as distributed by you in accordance with Section 1.1(a), pursuant to a written license that disclaims all warranties and liabilities on behalf of Licensor. 41 | 42 | 1.3. Notices. On all copies of the Software that you make, you must retain all copyright or other proprietary notices. 43 | 44 | 2. TERM AND TERMINATION. This Agreement will continue unless and until earlier terminated as set forth herein. If You breach any of its conditions or obligations under this Agreement, this Agreement will terminate automatically and the licenses granted herein will terminate automatically. 45 | 46 | 3. INTELLECTUAL PROPERTY. As between the parties, Licensor retains all right, title, and interest in the Software, and to Redis or other Licensor trademarks or service marks, and all intellectual property rights therein. Licensor hereby reserves all rights not expressly granted to You in this Agreement. 47 | 48 | 4. DISCLAIMER. TO THE EXTENT ALLOWABLE UNDER LAW, LICENSOR HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND CONDITIONS, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE SOFTWARE. Licensor has no obligation to support the Software. 49 | 50 | 5. LIMITATION OF LIABILITY. TO THE EXTENT ALLOWABLE UNDER LAW, LICENSOR WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND, INCLUDING BUT NOT LIMITED TO, LOST PROFITS OR ANY CONSEQUENTIAL, SPECIAL, INCIDENTAL, INDIRECT, OR DIRECT DAMAGES, ARISING OUT OF OR RELATING TO THIS AGREEMENT. 51 | 52 | 6. GENERAL. You are not authorized to assign Your rights under this Agreement to any third party. Licensor may freely assign its rights under this Agreement to any third party. This Agreement is the entire agreement between the parties on the subject matter hereof. No amendment or modification hereof will be valid or binding upon the parties unless made in writing and signed by the duly authorized representatives of both parties. In the event that any provision, including without limitation any condition, of this Agreement is held to be unenforceable, this Agreement and all licenses and rights granted hereunder will immediately terminate. Failure by Licensor to exercise any right hereunder will not be construed as a waiver of any subsequent breach of that right or as a waiver of any other right. This Agreement will be governed by and interpreted in accordance with the laws of the state of California, without reference to its conflict of laws principles. If You are located within the United States, all disputes arising out of this Agreement are subject to the exclusive jurisdiction of courts located in Santa Clara County, California. USA. If You are located outside of the United States, any dispute, controversy or claim arising out of or relating to this Agreement will be referred to and finally determined by arbitration in accordance with the JAMS before a single arbitrator in Santa Clara County, California. Judgment upon the award rendered by the arbitrator may be entered in any court having jurisdiction thereof. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![GitHub issues](https://img.shields.io/github/release/RedisLabsModules/RedisREST.svg)](https://github.com/RedisLabsModules/RedisREST/releases/latest) 2 | [![CircleCI](https://circleci.com/gh/RedisLabsModules/RedisREST/tree/master.svg?style=svg)](https://circleci.com/gh/RedisLabsModules/RedisREST/tree/master) 3 | 4 | # RedisREST 5 | Extension modules to Redis' native data types and commands 6 | 7 | 8 | ## Getting started 9 | 10 | ```bash 11 | cargo +nightly build --release 12 | redis-server --loadmodule ./target/release/libredisrest.so 13 | ``` 14 | 15 | *Note: Redis REST Module uses [Rocket](https://rocket.rs/) web frameworks that must be build using nightly version of Rust.* 16 | 17 | ### Using the Redis REST module 18 | 19 | Let's get, set and delete key in Redis: 20 | 21 | ```bash 22 | 23 | curl -X GET http://localhost:8000/set/foo/bar 24 | 25 | curl -X GET http://localhost:8000/get/foo 26 | 27 | curl -X GET http://localhost:8000/del/foo 28 | ``` 29 | 30 | Increment a value 31 | 32 | ``` bash 33 | curl -X GET http://localhost:8000/set/num/1 34 | 35 | curl -X GET http://localhost:8000/get/num 36 | 37 | curl -X GET http://localhost:8000/incr/num 38 | 39 | curl -X GET http://localhost:8000/get/num 40 | ``` 41 | 42 | Set and get a hash 43 | 44 | ``` bash 45 | curl -X GET http://localhost:8000/hset/hfoo/key1/val1/key2/val2 46 | 47 | curl -X GET http://localhost:8000/hgetall/hfoo 48 | 49 | curl -X GET http://localhost:8000/hmset/hfoo/key1/new_value1 50 | 51 | curl -X GET http://localhost:8000/hgetall/hfoo 52 | ``` 53 | 54 | You have the pattern... 55 | 56 | Enjoy! 57 | 58 | ## Configuring Web Server 59 | 60 | see: https://rocket.rs/v0.4/guide/configuration/ 61 | 62 | For example: 63 | ```bash 64 | ROCKET_ENV=production ROCKET_PORT=8080 redis-server --loadmodule ./target/release/libredisrest.so 65 | ``` 66 | -------------------------------------------------------------------------------- /ramp.yml: -------------------------------------------------------------------------------- 1 | display_name: RedisX 2 | author: Redis Labs 3 | email: redismodules@redislabs.com 4 | description: Extension modules to Redis' native data types and commands 5 | homepage: http://redis.io 6 | license: Redis Source Available License Agreement 7 | command_line_args: "" 8 | min_redis_version: "4.0" 9 | min_redis_pack_version: "5.0" 10 | capabilities: 11 | - types 12 | - no_multi_key 13 | - replica_of 14 | - eviction_expiry 15 | - failover_migrate 16 | - flash 17 | - backup_restore 18 | - reshard_rebalance 19 | - persistence_aof 20 | - persistence_rdb 21 | - hash_policy 22 | - clustering -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![feature(proc_macro_hygiene, decl_macro)] 2 | 3 | #[macro_use] 4 | extern crate rocket; 5 | 6 | #[macro_use] 7 | extern crate redis_module; 8 | 9 | use redis_module::raw as rawmod; 10 | 11 | use redis_module::{Context, RedisValue}; 12 | use rocket::response::content; 13 | use rocket::response::status::BadRequest; 14 | use std::path::PathBuf; 15 | use std::thread; 16 | 17 | fn to_json<'a>(value: &'a RedisValue) -> String { 18 | match value { 19 | RedisValue::SimpleStringStatic(v) => v.to_string(), 20 | RedisValue::SimpleString(v) => v.to_string(), 21 | RedisValue::BulkString(v) => v.to_string(), 22 | RedisValue::Integer(v) => v.to_string(), 23 | RedisValue::Float(v) => v.to_string(), 24 | RedisValue::Array(v) => { 25 | let mut s = String::from("["); 26 | s.push_str( 27 | v.iter() 28 | .map(|i| to_json(i)) 29 | .collect::>() 30 | .join(",") 31 | .as_str(), 32 | ); 33 | s.push(']'); 34 | s 35 | } 36 | RedisValue::None => "null".to_string(), 37 | } 38 | } 39 | 40 | #[get("/")] 41 | fn path(args: PathBuf) -> Result> { 42 | let args: Vec<&str> = args.iter().map(|arg| arg.to_str().unwrap()).collect(); 43 | let ctx = Context::get_thread_safe_context(); 44 | 45 | ctx.lock(); 46 | let result = ctx.call(args[0], &args[1..]); 47 | ctx.unlock(); 48 | 49 | match result { 50 | Ok(s) => Ok(to_json(&s)), 51 | Err(e) => Err(BadRequest(Some(format!("{}", e)))), 52 | } 53 | } 54 | 55 | #[get("/")] 56 | fn index() -> content::Html<&'static str> { 57 | content::Html( 58 | " 59 | 60 | 77 | 78 | 79 |
80 | \"Redis\" 81 |
82 |
83 | Redis CLI: 84 |
85 |
    86 |
87 | 88 | ", 89 | ) 90 | } 91 | 92 | pub extern "C" fn init(_raw_ctx: *mut rawmod::RedisModuleCtx) -> c_int { 93 | thread::spawn(|| rocket::ignite().mount("/", routes![index, path]).launch()); 94 | 0 95 | } 96 | 97 | redis_module! { 98 | name: "redisrest", 99 | version: 001000, 100 | data_types: [], 101 | init: init, 102 | commands: [], 103 | } 104 | -------------------------------------------------------------------------------- /test/pytest/Makefile: -------------------------------------------------------------------------------- 1 | test: 2 | python -m unittest discover -v 3 | -------------------------------------------------------------------------------- /test/pytest/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedisLabsModules/RedisREST/df0b9a66fe6359af6a8a33f3a998735e692cb265/test/pytest/__init__.py -------------------------------------------------------------------------------- /test/pytest/requirements.txt: -------------------------------------------------------------------------------- 1 | hiredis>=0.2.0 2 | redis>=2.10 3 | rmtest>=0.2 4 | six>=1.10.0 5 | requests>=2 -------------------------------------------------------------------------------- /test/pytest/test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from rmtest import BaseModuleTestCase 4 | import rmtest.config 5 | import redis 6 | import unittest 7 | import json 8 | import os 9 | import requests 10 | 11 | rmtest.config.REDIS_MODULE = os.path.abspath(os.path.join(os.getcwd(), 'target/debug/libredisrest.so')) 12 | 13 | class RedisRESTTestCase(BaseModuleTestCase): 14 | """Tests RedisRET Redis module in vitro""" 15 | 16 | def assertNotExists(self, r, key, msg=None): 17 | self.assertFalse(r.exists(key), msg) 18 | 19 | def assertOk(self, x, msg=None): 20 | self.assertEquals("OK", x, msg) 21 | 22 | def assertExists(self, r, key, msg=None): 23 | self.assertTrue(r.exists(key), msg) 24 | 25 | def testREST(self): 26 | """Test REST """ 27 | with self.redis() as r: 28 | r.client_setname(self._testMethodName) 29 | r.flushdb() 30 | requests.get(url = "http://localhost:8000/set/k/v") 31 | self.assertEquals('v', r.execute_command('get', 'k')) 32 | 33 | 34 | if __name__ == '__main__': 35 | unittest.main() 36 | --------------------------------------------------------------------------------