├── .gitignore ├── Cargo.toml ├── benches └── coin_flip_streaks.rs ├── src ├── main.rs └── lib.rs ├── README.md └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "coin_flip_streaks" 3 | version = "0.1.0" 4 | authors = ["cor "] 5 | edition = "2018" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | rand = "0.7.3" 11 | criterion = "0.3.1" 12 | 13 | [[bench]] 14 | name = "coin_flip_streaks" 15 | harness = false -------------------------------------------------------------------------------- /benches/coin_flip_streaks.rs: -------------------------------------------------------------------------------- 1 | use coin_flip_streaks::experiment; 2 | use criterion::{criterion_group, criterion_main, Criterion}; 3 | 4 | fn criterion_benchmark(c: &mut Criterion) { 5 | c.bench_function("coin flip streaks", |b| b.iter(|| experiment())); 6 | } 7 | 8 | criterion_group!{ 9 | name = benches; 10 | config = Criterion::default().sample_size(10); 11 | targets = criterion_benchmark, 12 | } 13 | criterion_main!(benches); -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use coin_flip_streaks::experiment; 2 | use rand::{Rng, RngCore}; 3 | use rand::prelude::ThreadRng; 4 | 5 | fn main() { 6 | // experiment(); 7 | 8 | let mut data = [0u8; 32]; 9 | rand::thread_rng().fill_bytes(&mut data); 10 | 11 | // let mut answer = 0b1100_0000_1000_1000_0011_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_1000_1000_0011_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000u128; 12 | // println!("{:b}", answer); 13 | // answer >>= 4; 14 | // println!("{:b}", answer); 15 | } 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # coin-flip-streaks-rs 2 | Test how many streaks of six times Heads or six times Tails are in a streak of 100 coin flips. 3 | Repeat this experiment 200,000 times, and calculate the average result. 4 | 5 | We benchmark the efficiency of the implementation using [Criterion](https://docs.rs/criterion). 6 | 7 | ## How to benchmark 8 | ```shell script 9 | cargo bench 10 | ``` 11 | 12 | ## How to change the sample size 13 | If you wish to adjust Criterion's sample size in order to speed up benchmarking, 14 | then you can do so in `./benches/coin_flip_streaks.rs`: 15 | 16 | ```rust 17 | // Change this ------------| 18 | // vvv 19 | config = Criterion::default().sample_size(100); 20 | ``` 21 | 22 | 23 | 24 | ## How to view benchmark results 25 | Open `./target/criterion/report/index.html` in your browser. For example, in macOS: 26 | ```shell script 27 | open ./target/criterion/report/index.html 28 | ``` 29 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use rand; 2 | use rand::Rng; 3 | use rand::prelude::ThreadRng; 4 | 5 | #[inline] 6 | pub fn experiment() { 7 | const EXPERIMENT_COUNT: usize = 200_000; 8 | 9 | let mut rng = rand::thread_rng(); 10 | let mut result: [i32; EXPERIMENT_COUNT] = [0; EXPERIMENT_COUNT]; 11 | for i in 0..result.len() { 12 | result[i] = find_streaks(&mut rng); 13 | } 14 | 15 | println!("{:?}", average(&result)); 16 | } 17 | 18 | 19 | fn find_streaks(rng: &mut ThreadRng) -> i32 { 20 | let mut coin_flips = [true; 100]; 21 | for i in 0..coin_flips.len() { 22 | coin_flips[i] = rng.gen_bool(0.5) 23 | } 24 | 25 | let mut streaks = 0; 26 | 27 | 'streak_search: for mut i in 0..(coin_flips.len() - 6) { 28 | for j in (i+1)..(i+6) { 29 | let coin_type = coin_flips[i]; 30 | if coin_flips[j] != coin_type { 31 | i += j; 32 | continue 'streak_search 33 | } 34 | } 35 | streaks += 1; 36 | } 37 | 38 | return streaks 39 | } 40 | 41 | fn average(numbers: &[i32]) -> f32 { 42 | numbers.iter().sum::() as f32 / numbers.len() as f32 43 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "atty" 5 | version = "0.2.14" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 8 | dependencies = [ 9 | "hermit-abi", 10 | "libc", 11 | "winapi", 12 | ] 13 | 14 | [[package]] 15 | name = "autocfg" 16 | version = "1.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" 19 | 20 | [[package]] 21 | name = "bitflags" 22 | version = "1.2.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 25 | 26 | [[package]] 27 | name = "bstr" 28 | version = "0.2.12" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2889e6d50f394968c8bf4240dc3f2a7eb4680844d27308f798229ac9d4725f41" 31 | dependencies = [ 32 | "lazy_static", 33 | "memchr", 34 | "regex-automata", 35 | "serde", 36 | ] 37 | 38 | [[package]] 39 | name = "bumpalo" 40 | version = "3.2.1" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "12ae9db68ad7fac5fe51304d20f016c911539251075a214f8e663babefa35187" 43 | 44 | [[package]] 45 | name = "byteorder" 46 | version = "1.3.4" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" 49 | 50 | [[package]] 51 | name = "cast" 52 | version = "0.2.3" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" 55 | dependencies = [ 56 | "rustc_version", 57 | ] 58 | 59 | [[package]] 60 | name = "cfg-if" 61 | version = "0.1.10" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" 64 | 65 | [[package]] 66 | name = "clap" 67 | version = "2.33.0" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 70 | dependencies = [ 71 | "bitflags", 72 | "textwrap", 73 | "unicode-width", 74 | ] 75 | 76 | [[package]] 77 | name = "coin_flip_streaks" 78 | version = "0.1.0" 79 | dependencies = [ 80 | "criterion", 81 | "rand", 82 | ] 83 | 84 | [[package]] 85 | name = "criterion" 86 | version = "0.3.1" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "1fc755679c12bda8e5523a71e4d654b6bf2e14bd838dfc48cde6559a05caf7d1" 89 | dependencies = [ 90 | "atty", 91 | "cast", 92 | "clap", 93 | "criterion-plot", 94 | "csv", 95 | "itertools", 96 | "lazy_static", 97 | "num-traits", 98 | "oorandom", 99 | "plotters", 100 | "rayon", 101 | "regex", 102 | "serde", 103 | "serde_derive", 104 | "serde_json", 105 | "tinytemplate", 106 | "walkdir", 107 | ] 108 | 109 | [[package]] 110 | name = "criterion-plot" 111 | version = "0.4.1" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "a01e15e0ea58e8234f96146b1f91fa9d0e4dd7a38da93ff7a75d42c0b9d3a545" 114 | dependencies = [ 115 | "cast", 116 | "itertools", 117 | ] 118 | 119 | [[package]] 120 | name = "crossbeam-deque" 121 | version = "0.7.3" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" 124 | dependencies = [ 125 | "crossbeam-epoch", 126 | "crossbeam-utils", 127 | "maybe-uninit", 128 | ] 129 | 130 | [[package]] 131 | name = "crossbeam-epoch" 132 | version = "0.8.2" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" 135 | dependencies = [ 136 | "autocfg", 137 | "cfg-if", 138 | "crossbeam-utils", 139 | "lazy_static", 140 | "maybe-uninit", 141 | "memoffset", 142 | "scopeguard", 143 | ] 144 | 145 | [[package]] 146 | name = "crossbeam-queue" 147 | version = "0.2.1" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" 150 | dependencies = [ 151 | "cfg-if", 152 | "crossbeam-utils", 153 | ] 154 | 155 | [[package]] 156 | name = "crossbeam-utils" 157 | version = "0.7.2" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" 160 | dependencies = [ 161 | "autocfg", 162 | "cfg-if", 163 | "lazy_static", 164 | ] 165 | 166 | [[package]] 167 | name = "csv" 168 | version = "1.1.3" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" 171 | dependencies = [ 172 | "bstr", 173 | "csv-core", 174 | "itoa", 175 | "ryu", 176 | "serde", 177 | ] 178 | 179 | [[package]] 180 | name = "csv-core" 181 | version = "0.1.10" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" 184 | dependencies = [ 185 | "memchr", 186 | ] 187 | 188 | [[package]] 189 | name = "either" 190 | version = "1.5.3" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 193 | 194 | [[package]] 195 | name = "getrandom" 196 | version = "0.1.14" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" 199 | dependencies = [ 200 | "cfg-if", 201 | "libc", 202 | "wasi", 203 | ] 204 | 205 | [[package]] 206 | name = "hermit-abi" 207 | version = "0.1.11" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "8a0d737e0f947a1864e93d33fdef4af8445a00d1ed8dc0c8ddb73139ea6abf15" 210 | dependencies = [ 211 | "libc", 212 | ] 213 | 214 | [[package]] 215 | name = "itertools" 216 | version = "0.8.2" 217 | source = "registry+https://github.com/rust-lang/crates.io-index" 218 | checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" 219 | dependencies = [ 220 | "either", 221 | ] 222 | 223 | [[package]] 224 | name = "itoa" 225 | version = "0.4.5" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" 228 | 229 | [[package]] 230 | name = "js-sys" 231 | version = "0.3.37" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "6a27d435371a2fa5b6d2b028a74bbdb1234f308da363226a2854ca3ff8ba7055" 234 | dependencies = [ 235 | "wasm-bindgen", 236 | ] 237 | 238 | [[package]] 239 | name = "lazy_static" 240 | version = "1.4.0" 241 | source = "registry+https://github.com/rust-lang/crates.io-index" 242 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 243 | 244 | [[package]] 245 | name = "libc" 246 | version = "0.2.69" 247 | source = "registry+https://github.com/rust-lang/crates.io-index" 248 | checksum = "99e85c08494b21a9054e7fe1374a732aeadaff3980b6990b94bfd3a70f690005" 249 | 250 | [[package]] 251 | name = "log" 252 | version = "0.4.8" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" 255 | dependencies = [ 256 | "cfg-if", 257 | ] 258 | 259 | [[package]] 260 | name = "maybe-uninit" 261 | version = "2.0.0" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" 264 | 265 | [[package]] 266 | name = "memchr" 267 | version = "2.3.3" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" 270 | 271 | [[package]] 272 | name = "memoffset" 273 | version = "0.5.4" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" 276 | dependencies = [ 277 | "autocfg", 278 | ] 279 | 280 | [[package]] 281 | name = "num-traits" 282 | version = "0.2.11" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" 285 | dependencies = [ 286 | "autocfg", 287 | ] 288 | 289 | [[package]] 290 | name = "num_cpus" 291 | version = "1.13.0" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 294 | dependencies = [ 295 | "hermit-abi", 296 | "libc", 297 | ] 298 | 299 | [[package]] 300 | name = "oorandom" 301 | version = "11.1.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "ebcec7c9c2a95cacc7cd0ecb89d8a8454eca13906f6deb55258ffff0adeb9405" 304 | 305 | [[package]] 306 | name = "plotters" 307 | version = "0.2.12" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "4e3bb8da247d27ae212529352020f3e5ee16e83c0c258061d27b08ab92675eeb" 310 | dependencies = [ 311 | "js-sys", 312 | "num-traits", 313 | "wasm-bindgen", 314 | "web-sys", 315 | ] 316 | 317 | [[package]] 318 | name = "ppv-lite86" 319 | version = "0.2.6" 320 | source = "registry+https://github.com/rust-lang/crates.io-index" 321 | checksum = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" 322 | 323 | [[package]] 324 | name = "proc-macro2" 325 | version = "1.0.10" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "df246d292ff63439fea9bc8c0a270bed0e390d5ebd4db4ba15aba81111b5abe3" 328 | dependencies = [ 329 | "unicode-xid", 330 | ] 331 | 332 | [[package]] 333 | name = "quote" 334 | version = "1.0.3" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f" 337 | dependencies = [ 338 | "proc-macro2", 339 | ] 340 | 341 | [[package]] 342 | name = "rand" 343 | version = "0.7.3" 344 | source = "registry+https://github.com/rust-lang/crates.io-index" 345 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 346 | dependencies = [ 347 | "getrandom", 348 | "libc", 349 | "rand_chacha", 350 | "rand_core", 351 | "rand_hc", 352 | ] 353 | 354 | [[package]] 355 | name = "rand_chacha" 356 | version = "0.2.2" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 359 | dependencies = [ 360 | "ppv-lite86", 361 | "rand_core", 362 | ] 363 | 364 | [[package]] 365 | name = "rand_core" 366 | version = "0.5.1" 367 | source = "registry+https://github.com/rust-lang/crates.io-index" 368 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 369 | dependencies = [ 370 | "getrandom", 371 | ] 372 | 373 | [[package]] 374 | name = "rand_hc" 375 | version = "0.2.0" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 378 | dependencies = [ 379 | "rand_core", 380 | ] 381 | 382 | [[package]] 383 | name = "rayon" 384 | version = "1.3.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" 387 | dependencies = [ 388 | "crossbeam-deque", 389 | "either", 390 | "rayon-core", 391 | ] 392 | 393 | [[package]] 394 | name = "rayon-core" 395 | version = "1.7.0" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" 398 | dependencies = [ 399 | "crossbeam-deque", 400 | "crossbeam-queue", 401 | "crossbeam-utils", 402 | "lazy_static", 403 | "num_cpus", 404 | ] 405 | 406 | [[package]] 407 | name = "regex" 408 | version = "1.3.7" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" 411 | dependencies = [ 412 | "regex-syntax", 413 | ] 414 | 415 | [[package]] 416 | name = "regex-automata" 417 | version = "0.1.9" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" 420 | dependencies = [ 421 | "byteorder", 422 | ] 423 | 424 | [[package]] 425 | name = "regex-syntax" 426 | version = "0.6.17" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "7fe5bd57d1d7414c6b5ed48563a2c855d995ff777729dcd91c369ec7fea395ae" 429 | 430 | [[package]] 431 | name = "rustc_version" 432 | version = "0.2.3" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 435 | dependencies = [ 436 | "semver", 437 | ] 438 | 439 | [[package]] 440 | name = "ryu" 441 | version = "1.0.3" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "535622e6be132bccd223f4bb2b8ac8d53cda3c7a6394944d3b2b33fb974f9d76" 444 | 445 | [[package]] 446 | name = "same-file" 447 | version = "1.0.6" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 450 | dependencies = [ 451 | "winapi-util", 452 | ] 453 | 454 | [[package]] 455 | name = "scopeguard" 456 | version = "1.1.0" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 459 | 460 | [[package]] 461 | name = "semver" 462 | version = "0.9.0" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 465 | dependencies = [ 466 | "semver-parser", 467 | ] 468 | 469 | [[package]] 470 | name = "semver-parser" 471 | version = "0.7.0" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 474 | 475 | [[package]] 476 | name = "serde" 477 | version = "1.0.106" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" 480 | 481 | [[package]] 482 | name = "serde_derive" 483 | version = "1.0.106" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" 486 | dependencies = [ 487 | "proc-macro2", 488 | "quote", 489 | "syn", 490 | ] 491 | 492 | [[package]] 493 | name = "serde_json" 494 | version = "1.0.51" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "da07b57ee2623368351e9a0488bb0b261322a15a6e0ae53e243cbdc0f4208da9" 497 | dependencies = [ 498 | "itoa", 499 | "ryu", 500 | "serde", 501 | ] 502 | 503 | [[package]] 504 | name = "syn" 505 | version = "1.0.17" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "0df0eb663f387145cab623dea85b09c2c5b4b0aef44e945d928e682fce71bb03" 508 | dependencies = [ 509 | "proc-macro2", 510 | "quote", 511 | "unicode-xid", 512 | ] 513 | 514 | [[package]] 515 | name = "textwrap" 516 | version = "0.11.0" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 519 | dependencies = [ 520 | "unicode-width", 521 | ] 522 | 523 | [[package]] 524 | name = "tinytemplate" 525 | version = "1.0.3" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "57a3c6667d3e65eb1bc3aed6fd14011c6cbc3a0665218ab7f5daf040b9ec371a" 528 | dependencies = [ 529 | "serde", 530 | "serde_json", 531 | ] 532 | 533 | [[package]] 534 | name = "unicode-width" 535 | version = "0.1.7" 536 | source = "registry+https://github.com/rust-lang/crates.io-index" 537 | checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" 538 | 539 | [[package]] 540 | name = "unicode-xid" 541 | version = "0.2.0" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" 544 | 545 | [[package]] 546 | name = "walkdir" 547 | version = "2.3.1" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" 550 | dependencies = [ 551 | "same-file", 552 | "winapi", 553 | "winapi-util", 554 | ] 555 | 556 | [[package]] 557 | name = "wasi" 558 | version = "0.9.0+wasi-snapshot-preview1" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 561 | 562 | [[package]] 563 | name = "wasm-bindgen" 564 | version = "0.2.60" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | checksum = "2cc57ce05287f8376e998cbddfb4c8cb43b84a7ec55cf4551d7c00eef317a47f" 567 | dependencies = [ 568 | "cfg-if", 569 | "wasm-bindgen-macro", 570 | ] 571 | 572 | [[package]] 573 | name = "wasm-bindgen-backend" 574 | version = "0.2.60" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "d967d37bf6c16cca2973ca3af071d0a2523392e4a594548155d89a678f4237cd" 577 | dependencies = [ 578 | "bumpalo", 579 | "lazy_static", 580 | "log", 581 | "proc-macro2", 582 | "quote", 583 | "syn", 584 | "wasm-bindgen-shared", 585 | ] 586 | 587 | [[package]] 588 | name = "wasm-bindgen-macro" 589 | version = "0.2.60" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "8bd151b63e1ea881bb742cd20e1d6127cef28399558f3b5d415289bc41eee3a4" 592 | dependencies = [ 593 | "quote", 594 | "wasm-bindgen-macro-support", 595 | ] 596 | 597 | [[package]] 598 | name = "wasm-bindgen-macro-support" 599 | version = "0.2.60" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "d68a5b36eef1be7868f668632863292e37739656a80fc4b9acec7b0bd35a4931" 602 | dependencies = [ 603 | "proc-macro2", 604 | "quote", 605 | "syn", 606 | "wasm-bindgen-backend", 607 | "wasm-bindgen-shared", 608 | ] 609 | 610 | [[package]] 611 | name = "wasm-bindgen-shared" 612 | version = "0.2.60" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "daf76fe7d25ac79748a37538b7daeed1c7a6867c92d3245c12c6222e4a20d639" 615 | 616 | [[package]] 617 | name = "web-sys" 618 | version = "0.3.37" 619 | source = "registry+https://github.com/rust-lang/crates.io-index" 620 | checksum = "2d6f51648d8c56c366144378a33290049eafdd784071077f6fe37dae64c1c4cb" 621 | dependencies = [ 622 | "js-sys", 623 | "wasm-bindgen", 624 | ] 625 | 626 | [[package]] 627 | name = "winapi" 628 | version = "0.3.8" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" 631 | dependencies = [ 632 | "winapi-i686-pc-windows-gnu", 633 | "winapi-x86_64-pc-windows-gnu", 634 | ] 635 | 636 | [[package]] 637 | name = "winapi-i686-pc-windows-gnu" 638 | version = "0.4.0" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 641 | 642 | [[package]] 643 | name = "winapi-util" 644 | version = "0.1.4" 645 | source = "registry+https://github.com/rust-lang/crates.io-index" 646 | checksum = "fa515c5163a99cc82bab70fd3bfdd36d827be85de63737b40fcef2ce084a436e" 647 | dependencies = [ 648 | "winapi", 649 | ] 650 | 651 | [[package]] 652 | name = "winapi-x86_64-pc-windows-gnu" 653 | version = "0.4.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 656 | --------------------------------------------------------------------------------