Browse Source

A Rust webserver so I can pick cards web2.0 style

Signed-off-by: Amy Aronsohn <WagThatTail@Me.com>
master
Amelia A 9 months ago
parent
commit
4eb3a1c90d
Signed by: Amy Aronsohn <WagThatTail@Me.com> GPG Key ID: 70C320ABA95D38C1
6 changed files with 1087 additions and 0 deletions
  1. 3
    0
      .gitignore
  2. 922
    0
      Cargo.lock
  3. 8
    0
      Cargo.toml
  4. 3
    0
      Makefile
  5. 40
    0
      README.md
  6. 111
    0
      src/main.rs

+ 3
- 0
.gitignore View File

@@ -2,3 +2,6 @@
2 2
 *.jpg
3 3
 *.png
4 4
 .DS_Store
5
+
6
+/target
7
+**/*.rs.bk

+ 922
- 0
Cargo.lock View File

@@ -0,0 +1,922 @@
1
+[[package]]
2
+name = "aho-corasick"
3
+version = "0.6.8"
4
+source = "registry+https://github.com/rust-lang/crates.io-index"
5
+dependencies = [
6
+ "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
7
+]
8
+
9
+[[package]]
10
+name = "arrayvec"
11
+version = "0.4.7"
12
+source = "registry+https://github.com/rust-lang/crates.io-index"
13
+dependencies = [
14
+ "nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
15
+]
16
+
17
+[[package]]
18
+name = "base64"
19
+version = "0.9.2"
20
+source = "registry+https://github.com/rust-lang/crates.io-index"
21
+dependencies = [
22
+ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
23
+ "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
24
+]
25
+
26
+[[package]]
27
+name = "bitflags"
28
+version = "1.0.4"
29
+source = "registry+https://github.com/rust-lang/crates.io-index"
30
+
31
+[[package]]
32
+name = "byteorder"
33
+version = "1.2.6"
34
+source = "registry+https://github.com/rust-lang/crates.io-index"
35
+
36
+[[package]]
37
+name = "bytes"
38
+version = "0.4.10"
39
+source = "registry+https://github.com/rust-lang/crates.io-index"
40
+dependencies = [
41
+ "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
42
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
43
+]
44
+
45
+[[package]]
46
+name = "cfg-if"
47
+version = "0.1.5"
48
+source = "registry+https://github.com/rust-lang/crates.io-index"
49
+
50
+[[package]]
51
+name = "cloudabi"
52
+version = "0.0.3"
53
+source = "registry+https://github.com/rust-lang/crates.io-index"
54
+dependencies = [
55
+ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
56
+]
57
+
58
+[[package]]
59
+name = "crossbeam-deque"
60
+version = "0.6.1"
61
+source = "registry+https://github.com/rust-lang/crates.io-index"
62
+dependencies = [
63
+ "crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
64
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
65
+]
66
+
67
+[[package]]
68
+name = "crossbeam-epoch"
69
+version = "0.5.2"
70
+source = "registry+https://github.com/rust-lang/crates.io-index"
71
+dependencies = [
72
+ "arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
73
+ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
74
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
75
+ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
76
+ "memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
77
+ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
78
+]
79
+
80
+[[package]]
81
+name = "crossbeam-utils"
82
+version = "0.5.0"
83
+source = "registry+https://github.com/rust-lang/crates.io-index"
84
+
85
+[[package]]
86
+name = "fnv"
87
+version = "1.0.6"
88
+source = "registry+https://github.com/rust-lang/crates.io-index"
89
+
90
+[[package]]
91
+name = "fuchsia-zircon"
92
+version = "0.3.3"
93
+source = "registry+https://github.com/rust-lang/crates.io-index"
94
+dependencies = [
95
+ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
96
+ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
97
+]
98
+
99
+[[package]]
100
+name = "fuchsia-zircon-sys"
101
+version = "0.3.3"
102
+source = "registry+https://github.com/rust-lang/crates.io-index"
103
+
104
+[[package]]
105
+name = "futures"
106
+version = "0.1.24"
107
+source = "registry+https://github.com/rust-lang/crates.io-index"
108
+
109
+[[package]]
110
+name = "futures-cpupool"
111
+version = "0.1.8"
112
+source = "registry+https://github.com/rust-lang/crates.io-index"
113
+dependencies = [
114
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
115
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
116
+]
117
+
118
+[[package]]
119
+name = "http"
120
+version = "0.1.12"
121
+source = "registry+https://github.com/rust-lang/crates.io-index"
122
+dependencies = [
123
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
124
+ "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
125
+ "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
126
+]
127
+
128
+[[package]]
129
+name = "httparse"
130
+version = "1.3.2"
131
+source = "registry+https://github.com/rust-lang/crates.io-index"
132
+
133
+[[package]]
134
+name = "hyper"
135
+version = "0.11.27"
136
+source = "registry+https://github.com/rust-lang/crates.io-index"
137
+dependencies = [
138
+ "base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
139
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
140
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
141
+ "futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
142
+ "httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
143
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
144
+ "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
145
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
146
+ "mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
147
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
148
+ "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
149
+ "relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
150
+ "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
151
+ "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
152
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
153
+ "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
154
+ "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
155
+ "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
156
+ "want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
157
+]
158
+
159
+[[package]]
160
+name = "iovec"
161
+version = "0.1.2"
162
+source = "registry+https://github.com/rust-lang/crates.io-index"
163
+dependencies = [
164
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
165
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
166
+]
167
+
168
+[[package]]
169
+name = "itoa"
170
+version = "0.4.3"
171
+source = "registry+https://github.com/rust-lang/crates.io-index"
172
+
173
+[[package]]
174
+name = "kernel32-sys"
175
+version = "0.2.2"
176
+source = "registry+https://github.com/rust-lang/crates.io-index"
177
+dependencies = [
178
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
179
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
180
+]
181
+
182
+[[package]]
183
+name = "language-tags"
184
+version = "0.2.2"
185
+source = "registry+https://github.com/rust-lang/crates.io-index"
186
+
187
+[[package]]
188
+name = "lazy_static"
189
+version = "1.1.0"
190
+source = "registry+https://github.com/rust-lang/crates.io-index"
191
+dependencies = [
192
+ "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
193
+]
194
+
195
+[[package]]
196
+name = "lazycell"
197
+version = "1.1.0"
198
+source = "registry+https://github.com/rust-lang/crates.io-index"
199
+
200
+[[package]]
201
+name = "libc"
202
+version = "0.2.43"
203
+source = "registry+https://github.com/rust-lang/crates.io-index"
204
+
205
+[[package]]
206
+name = "lock_api"
207
+version = "0.1.3"
208
+source = "registry+https://github.com/rust-lang/crates.io-index"
209
+dependencies = [
210
+ "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
211
+ "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
212
+]
213
+
214
+[[package]]
215
+name = "log"
216
+version = "0.3.9"
217
+source = "registry+https://github.com/rust-lang/crates.io-index"
218
+dependencies = [
219
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
220
+]
221
+
222
+[[package]]
223
+name = "log"
224
+version = "0.4.5"
225
+source = "registry+https://github.com/rust-lang/crates.io-index"
226
+dependencies = [
227
+ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
228
+]
229
+
230
+[[package]]
231
+name = "memchr"
232
+version = "2.0.2"
233
+source = "registry+https://github.com/rust-lang/crates.io-index"
234
+dependencies = [
235
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
236
+]
237
+
238
+[[package]]
239
+name = "memoffset"
240
+version = "0.2.1"
241
+source = "registry+https://github.com/rust-lang/crates.io-index"
242
+
243
+[[package]]
244
+name = "mime"
245
+version = "0.3.9"
246
+source = "registry+https://github.com/rust-lang/crates.io-index"
247
+dependencies = [
248
+ "unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
249
+]
250
+
251
+[[package]]
252
+name = "mio"
253
+version = "0.6.16"
254
+source = "registry+https://github.com/rust-lang/crates.io-index"
255
+dependencies = [
256
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
257
+ "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
258
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
259
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
260
+ "lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
261
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
262
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
263
+ "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
264
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
265
+ "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
266
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
267
+]
268
+
269
+[[package]]
270
+name = "mio-uds"
271
+version = "0.6.7"
272
+source = "registry+https://github.com/rust-lang/crates.io-index"
273
+dependencies = [
274
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
275
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
276
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
277
+]
278
+
279
+[[package]]
280
+name = "miow"
281
+version = "0.2.1"
282
+source = "registry+https://github.com/rust-lang/crates.io-index"
283
+dependencies = [
284
+ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
285
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
286
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
287
+ "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
288
+]
289
+
290
+[[package]]
291
+name = "net2"
292
+version = "0.2.33"
293
+source = "registry+https://github.com/rust-lang/crates.io-index"
294
+dependencies = [
295
+ "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
296
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
297
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
298
+]
299
+
300
+[[package]]
301
+name = "nodrop"
302
+version = "0.1.12"
303
+source = "registry+https://github.com/rust-lang/crates.io-index"
304
+
305
+[[package]]
306
+name = "num_cpus"
307
+version = "1.8.0"
308
+source = "registry+https://github.com/rust-lang/crates.io-index"
309
+dependencies = [
310
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
311
+]
312
+
313
+[[package]]
314
+name = "owning_ref"
315
+version = "0.3.3"
316
+source = "registry+https://github.com/rust-lang/crates.io-index"
317
+dependencies = [
318
+ "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
319
+]
320
+
321
+[[package]]
322
+name = "parking_lot"
323
+version = "0.6.4"
324
+source = "registry+https://github.com/rust-lang/crates.io-index"
325
+dependencies = [
326
+ "lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
327
+ "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
328
+]
329
+
330
+[[package]]
331
+name = "parking_lot_core"
332
+version = "0.3.1"
333
+source = "registry+https://github.com/rust-lang/crates.io-index"
334
+dependencies = [
335
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
336
+ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
337
+ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
338
+ "smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
339
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
340
+]
341
+
342
+[[package]]
343
+name = "percent-encoding"
344
+version = "1.0.1"
345
+source = "registry+https://github.com/rust-lang/crates.io-index"
346
+
347
+[[package]]
348
+name = "rand"
349
+version = "0.3.22"
350
+source = "registry+https://github.com/rust-lang/crates.io-index"
351
+dependencies = [
352
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
353
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
354
+ "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
355
+]
356
+
357
+[[package]]
358
+name = "rand"
359
+version = "0.4.3"
360
+source = "registry+https://github.com/rust-lang/crates.io-index"
361
+dependencies = [
362
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
363
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
364
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
365
+]
366
+
367
+[[package]]
368
+name = "rand"
369
+version = "0.5.5"
370
+source = "registry+https://github.com/rust-lang/crates.io-index"
371
+dependencies = [
372
+ "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
373
+ "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
374
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
375
+ "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
376
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
377
+]
378
+
379
+[[package]]
380
+name = "rand_core"
381
+version = "0.2.1"
382
+source = "registry+https://github.com/rust-lang/crates.io-index"
383
+
384
+[[package]]
385
+name = "redox_syscall"
386
+version = "0.1.40"
387
+source = "registry+https://github.com/rust-lang/crates.io-index"
388
+
389
+[[package]]
390
+name = "regex"
391
+version = "0.2.11"
392
+source = "registry+https://github.com/rust-lang/crates.io-index"
393
+dependencies = [
394
+ "aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)",
395
+ "memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
396
+ "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
397
+ "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
398
+ "utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
399
+]
400
+
401
+[[package]]
402
+name = "regex-syntax"
403
+version = "0.5.6"
404
+source = "registry+https://github.com/rust-lang/crates.io-index"
405
+dependencies = [
406
+ "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
407
+]
408
+
409
+[[package]]
410
+name = "relay"
411
+version = "0.1.1"
412
+source = "registry+https://github.com/rust-lang/crates.io-index"
413
+dependencies = [
414
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
415
+]
416
+
417
+[[package]]
418
+name = "rustc_version"
419
+version = "0.2.3"
420
+source = "registry+https://github.com/rust-lang/crates.io-index"
421
+dependencies = [
422
+ "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
423
+]
424
+
425
+[[package]]
426
+name = "safemem"
427
+version = "0.2.0"
428
+source = "registry+https://github.com/rust-lang/crates.io-index"
429
+
430
+[[package]]
431
+name = "scoped-tls"
432
+version = "0.1.2"
433
+source = "registry+https://github.com/rust-lang/crates.io-index"
434
+
435
+[[package]]
436
+name = "scopeguard"
437
+version = "0.3.3"
438
+source = "registry+https://github.com/rust-lang/crates.io-index"
439
+
440
+[[package]]
441
+name = "semver"
442
+version = "0.9.0"
443
+source = "registry+https://github.com/rust-lang/crates.io-index"
444
+dependencies = [
445
+ "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
446
+]
447
+
448
+[[package]]
449
+name = "semver-parser"
450
+version = "0.7.0"
451
+source = "registry+https://github.com/rust-lang/crates.io-index"
452
+
453
+[[package]]
454
+name = "shio"
455
+version = "0.3.0"
456
+source = "registry+https://github.com/rust-lang/crates.io-index"
457
+dependencies = [
458
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
459
+ "http 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
460
+ "hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)",
461
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
462
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
463
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
464
+ "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
465
+ "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
466
+ "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
467
+ "unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
468
+]
469
+
470
+[[package]]
471
+name = "silicon-dawn"
472
+version = "0.1.0"
473
+dependencies = [
474
+ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
475
+ "shio 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
476
+]
477
+
478
+[[package]]
479
+name = "slab"
480
+version = "0.3.0"
481
+source = "registry+https://github.com/rust-lang/crates.io-index"
482
+
483
+[[package]]
484
+name = "slab"
485
+version = "0.4.1"
486
+source = "registry+https://github.com/rust-lang/crates.io-index"
487
+
488
+[[package]]
489
+name = "smallvec"
490
+version = "0.2.1"
491
+source = "registry+https://github.com/rust-lang/crates.io-index"
492
+
493
+[[package]]
494
+name = "smallvec"
495
+version = "0.6.5"
496
+source = "registry+https://github.com/rust-lang/crates.io-index"
497
+dependencies = [
498
+ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
499
+]
500
+
501
+[[package]]
502
+name = "stable_deref_trait"
503
+version = "1.1.1"
504
+source = "registry+https://github.com/rust-lang/crates.io-index"
505
+
506
+[[package]]
507
+name = "take"
508
+version = "0.1.0"
509
+source = "registry+https://github.com/rust-lang/crates.io-index"
510
+
511
+[[package]]
512
+name = "thread_local"
513
+version = "0.3.6"
514
+source = "registry+https://github.com/rust-lang/crates.io-index"
515
+dependencies = [
516
+ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
517
+]
518
+
519
+[[package]]
520
+name = "time"
521
+version = "0.1.40"
522
+source = "registry+https://github.com/rust-lang/crates.io-index"
523
+dependencies = [
524
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
525
+ "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
526
+ "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
527
+]
528
+
529
+[[package]]
530
+name = "tokio"
531
+version = "0.1.8"
532
+source = "registry+https://github.com/rust-lang/crates.io-index"
533
+dependencies = [
534
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
535
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
536
+ "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
537
+ "tokio-current-thread 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
538
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
539
+ "tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
540
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
541
+ "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
542
+ "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
543
+ "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
544
+ "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
545
+ "tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
546
+ "tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
547
+]
548
+
549
+[[package]]
550
+name = "tokio-codec"
551
+version = "0.1.0"
552
+source = "registry+https://github.com/rust-lang/crates.io-index"
553
+dependencies = [
554
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
555
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
556
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
557
+]
558
+
559
+[[package]]
560
+name = "tokio-core"
561
+version = "0.1.17"
562
+source = "registry+https://github.com/rust-lang/crates.io-index"
563
+dependencies = [
564
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
565
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
566
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
567
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
568
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
569
+ "scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
570
+ "tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
571
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
572
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
573
+ "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
574
+ "tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
575
+]
576
+
577
+[[package]]
578
+name = "tokio-current-thread"
579
+version = "0.1.1"
580
+source = "registry+https://github.com/rust-lang/crates.io-index"
581
+dependencies = [
582
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
583
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
584
+]
585
+
586
+[[package]]
587
+name = "tokio-executor"
588
+version = "0.1.4"
589
+source = "registry+https://github.com/rust-lang/crates.io-index"
590
+dependencies = [
591
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
592
+]
593
+
594
+[[package]]
595
+name = "tokio-fs"
596
+version = "0.1.3"
597
+source = "registry+https://github.com/rust-lang/crates.io-index"
598
+dependencies = [
599
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
600
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
601
+ "tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
602
+]
603
+
604
+[[package]]
605
+name = "tokio-io"
606
+version = "0.1.8"
607
+source = "registry+https://github.com/rust-lang/crates.io-index"
608
+dependencies = [
609
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
610
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
611
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
612
+]
613
+
614
+[[package]]
615
+name = "tokio-proto"
616
+version = "0.1.1"
617
+source = "registry+https://github.com/rust-lang/crates.io-index"
618
+dependencies = [
619
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
620
+ "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
621
+ "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
622
+ "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)",
623
+ "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
624
+ "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
625
+ "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
626
+ "tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
627
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
628
+ "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
629
+]
630
+
631
+[[package]]
632
+name = "tokio-reactor"
633
+version = "0.1.5"
634
+source = "registry+https://github.com/rust-lang/crates.io-index"
635
+dependencies = [
636
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
637
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
638
+ "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
639
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
640
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
641
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
642
+ "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
643
+ "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
644
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
645
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
646
+]
647
+
648
+[[package]]
649
+name = "tokio-service"
650
+version = "0.1.0"
651
+source = "registry+https://github.com/rust-lang/crates.io-index"
652
+dependencies = [
653
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
654
+]
655
+
656
+[[package]]
657
+name = "tokio-tcp"
658
+version = "0.1.1"
659
+source = "registry+https://github.com/rust-lang/crates.io-index"
660
+dependencies = [
661
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
662
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
663
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
664
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
665
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
666
+ "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
667
+]
668
+
669
+[[package]]
670
+name = "tokio-threadpool"
671
+version = "0.1.6"
672
+source = "registry+https://github.com/rust-lang/crates.io-index"
673
+dependencies = [
674
+ "crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
675
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
676
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
677
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
678
+ "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
679
+ "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
680
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
681
+]
682
+
683
+[[package]]
684
+name = "tokio-timer"
685
+version = "0.2.6"
686
+source = "registry+https://github.com/rust-lang/crates.io-index"
687
+dependencies = [
688
+ "crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
689
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
690
+ "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
691
+ "tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
692
+]
693
+
694
+[[package]]
695
+name = "tokio-udp"
696
+version = "0.1.2"
697
+source = "registry+https://github.com/rust-lang/crates.io-index"
698
+dependencies = [
699
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
700
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
701
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
702
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
703
+ "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
704
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
705
+ "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
706
+]
707
+
708
+[[package]]
709
+name = "tokio-uds"
710
+version = "0.2.1"
711
+source = "registry+https://github.com/rust-lang/crates.io-index"
712
+dependencies = [
713
+ "bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)",
714
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
715
+ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
716
+ "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
717
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
718
+ "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)",
719
+ "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
720
+ "tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
721
+ "tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
722
+]
723
+
724
+[[package]]
725
+name = "traitobject"
726
+version = "0.1.0"
727
+source = "registry+https://github.com/rust-lang/crates.io-index"
728
+
729
+[[package]]
730
+name = "try-lock"
731
+version = "0.1.0"
732
+source = "registry+https://github.com/rust-lang/crates.io-index"
733
+
734
+[[package]]
735
+name = "ucd-util"
736
+version = "0.1.1"
737
+source = "registry+https://github.com/rust-lang/crates.io-index"
738
+
739
+[[package]]
740
+name = "unicase"
741
+version = "2.1.0"
742
+source = "registry+https://github.com/rust-lang/crates.io-index"
743
+dependencies = [
744
+ "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
745
+]
746
+
747
+[[package]]
748
+name = "unreachable"
749
+version = "1.0.0"
750
+source = "registry+https://github.com/rust-lang/crates.io-index"
751
+dependencies = [
752
+ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
753
+]
754
+
755
+[[package]]
756
+name = "unsafe-any"
757
+version = "0.4.2"
758
+source = "registry+https://github.com/rust-lang/crates.io-index"
759
+dependencies = [
760
+ "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
761
+]
762
+
763
+[[package]]
764
+name = "utf8-ranges"
765
+version = "1.0.1"
766
+source = "registry+https://github.com/rust-lang/crates.io-index"
767
+
768
+[[package]]
769
+name = "version_check"
770
+version = "0.1.4"
771
+source = "registry+https://github.com/rust-lang/crates.io-index"
772
+
773
+[[package]]
774
+name = "void"
775
+version = "1.0.2"
776
+source = "registry+https://github.com/rust-lang/crates.io-index"
777
+
778
+[[package]]
779
+name = "want"
780
+version = "0.0.4"
781
+source = "registry+https://github.com/rust-lang/crates.io-index"
782
+dependencies = [
783
+ "futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)",
784
+ "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
785
+ "try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
786
+]
787
+
788
+[[package]]
789
+name = "winapi"
790
+version = "0.2.8"
791
+source = "registry+https://github.com/rust-lang/crates.io-index"
792
+
793
+[[package]]
794
+name = "winapi"
795
+version = "0.3.5"
796
+source = "registry+https://github.com/rust-lang/crates.io-index"
797
+dependencies = [
798
+ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
799
+ "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
800
+]
801
+
802
+[[package]]
803
+name = "winapi-build"
804
+version = "0.1.1"
805
+source = "registry+https://github.com/rust-lang/crates.io-index"
806
+
807
+[[package]]
808
+name = "winapi-i686-pc-windows-gnu"
809
+version = "0.4.0"
810
+source = "registry+https://github.com/rust-lang/crates.io-index"
811
+
812
+[[package]]
813
+name = "winapi-x86_64-pc-windows-gnu"
814
+version = "0.4.0"
815
+source = "registry+https://github.com/rust-lang/crates.io-index"
816
+
817
+[[package]]
818
+name = "ws2_32-sys"
819
+version = "0.2.1"
820
+source = "registry+https://github.com/rust-lang/crates.io-index"
821
+dependencies = [
822
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
823
+ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
824
+]
825
+
826
+[metadata]
827
+"checksum aho-corasick 0.6.8 (registry+https://github.com/rust-lang/crates.io-index)" = "68f56c7353e5a9547cbd76ed90f7bb5ffc3ba09d4ea9bd1d8c06c8b1142eeb5a"
828
+"checksum arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a1e964f9e24d588183fcb43503abda40d288c8657dfc27311516ce2f05675aef"
829
+"checksum base64 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "85415d2594767338a74a30c1d370b2f3262ec1b4ed2d7bba5b3faf4de40467d9"
830
+"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12"
831
+"checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781"
832
+"checksum bytes 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "0ce55bd354b095246fc34caf4e9e242f5297a7fd938b090cadfea6eee614aa62"
833
+"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3"
834
+"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
835
+"checksum crossbeam-deque 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3486aefc4c0487b9cb52372c97df0a48b8c249514af1ee99703bf70d2f2ceda1"
836
+"checksum crossbeam-epoch 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "30fecfcac6abfef8771151f8be4abc9e4edc112c2bcb233314cafde2680536e9"
837
+"checksum crossbeam-utils 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "677d453a17e8bd2b913fa38e8b9cf04bcdbb5be790aa294f2389661d72036015"
838
+"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3"
839
+"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
840
+"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
841
+"checksum futures 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "0c84b40c7e2de99ffd70602db314a7a8c26b2b3d830e6f7f7a142a8860ab3ca4"
842
+"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
843
+"checksum http 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "3e5765436510a2021e6917dfb87d1afa4b32d17c71353c013897fa5da29527a1"
844
+"checksum httparse 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7b6288d7db100340ca12873fd4d08ad1b8f206a9457798dfb17c018a33fee540"
845
+"checksum hyper 0.11.27 (registry+https://github.com/rust-lang/crates.io-index)" = "34a590ca09d341e94cddf8e5af0bbccde205d5fbc2fa3c09dd67c7f85cea59d7"
846
+"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
847
+"checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b"
848
+"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
849
+"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
850
+"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
851
+"checksum lazycell 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e26d4c411b39f0afcf2ba6fe502be90e6c9b299c952dbd86124782520a13cffd"
852
+"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
853
+"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
854
+"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
855
+"checksum log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fcce5fa49cc693c312001daf1d13411c4a5283796bac1084299ea3e567113f"
856
+"checksum memchr 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a3b4142ab8738a78c51896f704f83c11df047ff1bda9a92a661aa6361552d93d"
857
+"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
858
+"checksum mime 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4b082692d3f6cf41b453af73839ce3dfc212c4411cbb2441dff80a716e38bd79"
859
+"checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432"
860
+"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125"
861
+"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
862
+"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
863
+"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
864
+"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
865
+"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
866
+"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
867
+"checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c"
868
+"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
869
+"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
870
+"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd"
871
+"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c"
872
+"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2"
873
+"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1"
874
+"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
875
+"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
876
+"checksum relay 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1576e382688d7e9deecea24417e350d3062d97e32e45d70b1cde65994ff1489a"
877
+"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
878
+"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f"
879
+"checksum scoped-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "332ffa32bf586782a3efaeb58f127980944bbc8c4d6913a86107ac2a5ab24b28"
880
+"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27"
881
+"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
882
+"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
883
+"checksum shio 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "221f38bad0d8e19e7b3bffdf1c5d3cee588b66ac9b6648a335ffe26779a4321e"
884
+"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
885
+"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d"
886
+"checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013"
887
+"checksum smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "153ffa32fd170e9944f7e0838edf824a754ec4c1fc64746fcc9fe1f8fa602e5d"
888
+"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
889
+"checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5"
890
+"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
891
+"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b"
892
+"checksum tokio 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fbb6a6e9db2702097bfdfddcb09841211ad423b86c75b5ddaca1d62842ac492c"
893
+"checksum tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881e9645b81c2ce95fcb799ded2c29ffb9f25ef5bef909089a420e5961dd8ccb"
894
+"checksum tokio-core 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "aeeffbbb94209023feaef3c196a41cbcdafa06b4a6f893f68779bb5e53796f71"
895
+"checksum tokio-current-thread 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdfb899688ac16f618076bd09215edbfda0fd5dfecb375b6942636cb31fa8a7"
896
+"checksum tokio-executor 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "84823b932d566bc3c6aa644df4ca36cb38593c50b7db06011fd4e12e31e4047e"
897
+"checksum tokio-fs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b5cbe4ca6e71cb0b62a66e4e6f53a8c06a6eefe46cc5f665ad6f274c9906f135"
898
+"checksum tokio-io 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8d6cc2de7725863c86ac71b0b9068476fec50834f055a243558ef1655bbd34cb"
899
+"checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389"
900
+"checksum tokio-reactor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "4bfbaf9f260635649ec26b6fb4aded03887295ffcd999f6e43fd2c4758f758ea"
901
+"checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162"
902
+"checksum tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5b4c329b47f071eb8a746040465fa751bd95e4716e98daef6a9b4e434c17d565"
903
+"checksum tokio-threadpool 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a5758cecb6e0633cea5d563ac07c975e04961690b946b04fd84e7d6445a8f6af"
904
+"checksum tokio-timer 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d03fa701f9578a01b7014f106b47f0a363b4727a7f3f75d666e312ab7acbbf1c"
905
+"checksum tokio-udp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "da941144b816d0dcda4db3a1ba87596e4df5e860a72b70783fe435891f80601c"
906
+"checksum tokio-uds 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "424c1ed15a0132251813ccea50640b224c809d6ceafb88154c1a8775873a0e89"
907
+"checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
908
+"checksum try-lock 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2aa4715743892880f70885373966c83d73ef1b0838a664ef0c76fffd35e7c2"
909
+"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
910
+"checksum unicase 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284b6d3db520d67fbe88fd778c21510d1b0ba4a551e5d0fbb023d33405f6de8a"
911
+"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
912
+"checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f"
913
+"checksum utf8-ranges 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd70f467df6810094968e2fce0ee1bd0e87157aceb026a8c083bcf5e25b9efe4"
914
+"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
915
+"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
916
+"checksum want 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a05d9d966753fa4b5c8db73fcab5eed4549cfe0e1e4e66911e5564a0085c35d1"
917
+"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
918
+"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
919
+"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
920
+"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
921
+"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
922
+"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"

+ 8
- 0
Cargo.toml View File

@@ -0,0 +1,8 @@
1
+[package]
2
+name = "silicon-dawn"
3
+version = "0.1.0"
4
+authors = ["Amy Aronsohn <WagThatTail@Me.com>"]
5
+
6
+[dependencies]
7
+shio = "0.3"
8
+rand = "0.5"

+ 3
- 0
Makefile View File

@@ -5,3 +5,6 @@ DUMMY: pick
5 5
 setup: The\ Tarot\ of\ the\ Silicon\ Dawn
6 6
 	pipenv install
7 7
 	pipenv run python get.py
8
+
9
+web:
10
+	cargo run --release

+ 40
- 0
README.md View File

@@ -21,3 +21,43 @@ I designed this for use in [Pythonista](http://omz-software.com/pythonista/) but
21 21
 1. Clone/download this somewhere
22 22
 1. `make setup` in the directory to install deps & get cards
23 23
 1. `make` to get a random card and description displayed
24
+
25
+## Web Part
26
+
27
+Pythonista isn't the BEST experiance I found, so I wrote a web daemon you can compile it and run it wherever you want.
28
+Becasue everything is best as a web page (?question mark?)
29
+I run this on a random server I bookmarked on my phone.
30
+
31
+
32
+Why did I write it in rust?
33
+Because _I hate myself_.
34
+I have no better answer.
35
+I wouldn't recommend doing what I did.
36
+Don't use my code as an example and don't write web daemons in rust.
37
+I originally was going to write a small flask app or even write it in go, which I normally do, and it's super easy to do...
38
+Instead I wanted to experiment and wasted half a day just to produce this beast.
39
+It's some of the most painful code I've ever written.
40
+See where in `list_all_jpgs()` where I `cards.push(format!("{}", entry.file_name().to_str().unwrap()));`?
41
+I regret everything about that line but after spending over an hour fighting the borrow checker I gave up on life and did that.
42
+The function `render_card_picks()` is me just wanting the suffering to end and it shows.
43
+Seriously... fuck this code and fuck rust in the face.
44
+I wanted to refactor `return_card()` to be less monolithic and be more testable but I can't practice that level of self harm.
45
+I'd love to write tests for all the parts of this so I can refacter lots of it but again...
46
+I don't hate myself _that much_.
47
+Speaking of pain I started writing this directly in hyper.rs.
48
+Have you ever written boilerplate for your boilerplate?
49
+I'm sure it's amazing to have a flexible and extensible web framework that can do everything.
50
+But does it require writing an LoC comparible to Apache Tomcat's just to make something this basic?
51
+Now I'm just venting angry noises becasue I'm hangry.
52
+I started this after lunch and now it's super late.
53
+The only advantage is that somehow I can't seem to get a directory traversal exploit on it.
54
+I'm sure it's possible but for some reason I could get down a directory.
55
+So... plus one big fat question mark?
56
+Either way it's written, and my regrets are on display.
57
+So I hope you enjoy it.
58
+My Pain.
59
+
60
+1. [install rust](https://doc.rust-lang.org/1.29.0/cargo/getting-started/installation.html)
61
+1. `make web` to run the daemon
62
+1. browse to http://localhost:3000 to enjoy your pick
63
+1. Refresh the page for a fresh pick

+ 111
- 0
src/main.rs View File

@@ -0,0 +1,111 @@
1
+extern crate shio;
2
+extern crate rand;
3
+
4
+use rand::prelude::*;
5
+use shio::prelude::*;
6
+use std::fs::{self, File};
7
+use std::path::Path;
8
+use std::io::Read;
9
+use std::{env, process};
10
+
11
+const CARD_DIRECTORY: &str = "The Tarot of the Silicon Dawn";
12
+const CARD_URI: &str = "cards";
13
+const STANDARD_PORT: u16 = 3000;
14
+
15
+
16
+fn main() {
17
+    let mut port: u16 = STANDARD_PORT;
18
+
19
+    if let Some(arg1) = env::args().nth(1) {
20
+        if let Ok(new_port) = arg1.parse::<u16>() {
21
+            port = new_port;
22
+        } else {
23
+            eprintln!("Usage: silicon-dawn <port>");
24
+            process::exit(1);
25
+        }
26
+    }
27
+    Shio::default()
28
+        .route((Method::GET, "/", pick_card))
29
+        .route((Method::GET, format!("/{}/{{card_name}}", CARD_URI).as_str(), return_card))
30
+        .run(format!(":{}", port))
31
+        .unwrap();
32
+}
33
+
34
+
35
+fn pick_card(_: Context) -> Response {
36
+    if let Ok(cards) = list_all_jpgs(Path::new(CARD_DIRECTORY)) {
37
+
38
+        let mut rng = thread_rng();
39
+        let pick = rng.choose(&cards).unwrap();
40
+
41
+        Response::with(render_card_picks(pick))
42
+    } else {
43
+        status_500()
44
+    }
45
+}
46
+
47
+
48
+fn list_all_jpgs(dir: &Path) -> Result<Vec<String>, &str> {
49
+    let mut cards = Vec::new();
50
+
51
+    if dir.is_dir() {
52
+        if let Ok(files) = fs::read_dir(dir) {
53
+            for entry in files {
54
+                if let Ok(entry) = entry {
55
+                    let path = entry.path();
56
+                    if let Some(file_type) = path.extension() {
57
+                        if file_type == "jpg" {
58
+                            cards.push(format!("{}", entry.file_name().to_str().unwrap()));
59
+                        }
60
+                    }
61
+                }
62
+            }
63
+        }
64
+    } else {
65
+        return Err("Not a directory")
66
+    }
67
+
68
+    Ok(cards)
69
+}
70
+
71
+
72
+fn render_card_picks(card_name: &str) -> String {
73
+    let card_base = card_name.replace(".jpg","");
74
+    let card_text = format!("{}-text.png", card_base);
75
+
76
+    format!("<html><body bgcolor=#000000><img src={uri}/{card} alt={card} /><br /><img src={uri}/{text} alt={text} /></body></html>", uri = CARD_URI, card =  card_name, text = card_text)
77
+}
78
+
79
+
80
+fn return_card(ctx: Context) -> Response {
81
+    let directory_path = Path::new(CARD_DIRECTORY);
82
+    let file_name = &ctx.get::<Parameters>()["card_name"];
83
+    let full_path = directory_path.join(file_name);
84
+
85
+    match File::open(full_path) {
86
+        Ok(mut f) => {
87
+            let mut buffer = Vec::new();
88
+            match f.read_to_end(&mut buffer) {
89
+                Ok(_) => {
90
+                    return Response::build()
91
+                        .body(buffer)
92
+                        .into();
93
+                },
94
+                Err(_) => {
95
+                    return status_500();
96
+                },
97
+            };
98
+        },
99
+        _ => {
100
+            return status_404();
101
+        },
102
+    }
103
+}
104
+
105
+fn status_404() -> Response {
106
+    Response::build().status(StatusCode::NotFound).into()
107
+}
108
+
109
+fn status_500() -> Response {
110
+    Response::build().status(StatusCode::InternalServerError).into()
111
+}

Loading…
Cancel
Save