├── .gitignore ├── step_2 ├── src │ └── main.rs └── Cargo.toml ├── step_1 ├── src │ └── main.rs └── Cargo.toml ├── README.md ├── cat_1 ├── Cargo.toml └── src │ └── main.rs ├── cat_2 ├── Cargo.toml └── src │ └── main.rs ├── grep_1 ├── Cargo.toml └── src │ └── main.rs ├── grep_2 ├── Cargo.toml └── src │ └── main.rs ├── step_3 ├── Cargo.toml └── src │ └── main.rs ├── step_4 ├── Cargo.toml └── src │ └── main.rs ├── step_5 ├── Cargo.toml └── src │ └── main.rs ├── step_6 ├── Cargo.toml └── src │ └── main.rs ├── step_7 ├── Cargo.toml └── src │ └── main.rs ├── grep_3 ├── Cargo.toml └── src │ └── main.rs ├── explain_move ├── Cargo.toml └── src │ └── main.rs ├── grep_4 ├── Cargo.toml └── src │ └── main.rs ├── grep_5 ├── Cargo.toml └── src │ └── main.rs ├── grep_6 ├── Cargo.toml └── src │ └── main.rs ├── Cargo.toml └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /step_2/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let mut x = 1; 3 | x = 2; 4 | println!("{}", x); 5 | } 6 | -------------------------------------------------------------------------------- /step_1/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let answer: &str = "cram"; // 型注釈は省略可能。 3 | println!("How can a clam {} in a clean cream can?", answer); 4 | } 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-basic-handson 2 | 3 | - step_xx: basic training for mastering Rust's syntax 4 | - cat_xx: implementation of `cat` command in Rust 5 | - grep_xx: implementation of `grep` command in Rust 6 | -------------------------------------------------------------------------------- /cat_1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "cat_1" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /cat_2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "cat_2" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /grep_1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_1" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /grep_2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_2" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_1/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_1" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_2/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_2" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_3" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_4/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_4" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_5/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_5" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_6/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_6" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /step_7/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "step_7" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | -------------------------------------------------------------------------------- /grep_3/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_6" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | structopt = "0.3.21" -------------------------------------------------------------------------------- /explain_move/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "explain_move" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | 10 | -------------------------------------------------------------------------------- /grep_4/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_2_5" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | structopt = "0.3.21" 10 | -------------------------------------------------------------------------------- /grep_5/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_4" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | structopt = "0.3.21" 10 | -------------------------------------------------------------------------------- /grep_6/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "grep_5" 3 | version = "0.1.0" 4 | edition = "2018" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | rayon = "1.5.1" 10 | structopt = "0.3.21" 11 | -------------------------------------------------------------------------------- /cat_1/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | 3 | fn run_cat() { 4 | let path = "./src/main.rs"; 5 | match read_to_string(path) { 6 | Ok(content) => print!("{}", content), 7 | Err(reason) => println!("{}", reason), 8 | } 9 | } 10 | 11 | fn main() { 12 | run_cat(); 13 | } 14 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "cat_1", 4 | "cat_2", 5 | "explain_move", 6 | "grep_1", 7 | "grep_2", 8 | "grep_3", 9 | "grep_4", 10 | "grep_5", 11 | "grep_6", 12 | "step_1", 13 | "step_2", 14 | "step_3", 15 | "step_4", 16 | "step_5", 17 | "step_6", 18 | "step_7" 19 | ] -------------------------------------------------------------------------------- /step_3/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let this_is_str = "こう束縛すると &str 型になります"; 3 | let this_is_string = "こう束縛すると String 型になります。".to_string(); 4 | let mut this_is_mut_string = "こう束縛するとミュータブルな String 型になります。".to_string(); 5 | this_is_mut_string.push_str("さらに、String 型はあとから文字列を追加できます。"); 6 | 7 | println!("{}", this_is_mut_string); 8 | } 9 | -------------------------------------------------------------------------------- /step_4/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let num = 10; 3 | let fizzbuzz = if num % 15 == 0 { 4 | "FizzBuzz".to_string() 5 | } else if num % 3 == 0 { 6 | "Fizz".to_string() 7 | } else if num % 5 == 0 { 8 | "Buzz".to_string() 9 | } else { 10 | num.to_string() 11 | }; 12 | println!("{}", fizzbuzz); 13 | } 14 | -------------------------------------------------------------------------------- /step_5/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | for num in 0..100 { 3 | let fizzbuzz = if num % 15 == 0 { 4 | "FizzBuzz".to_string() 5 | } else if num % 3 == 0 { 6 | "Fizz".to_string() 7 | } else if num % 5 == 0 { 8 | "Buzz".to_string() 9 | } else { 10 | num.to_string() 11 | }; 12 | println!("{}", fizzbuzz); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /cat_2/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | 3 | fn run_cat(path: String) { 4 | match read_to_string(path) { 5 | Ok(content) => print!("{}", content), 6 | Err(reason) => println!("{}", reason), 7 | } 8 | } 9 | 10 | fn main() { 11 | match std::env::args().nth(1) { 12 | Some(path) => run_cat(path), 13 | None => println!("No path is specified!"), 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /step_6/src/main.rs: -------------------------------------------------------------------------------- 1 | fn fizzbuzz(num: i32) -> String { 2 | if num % 15 == 0 { 3 | "FizzBuzz".to_string() 4 | } else if num % 3 == 0 { 5 | "Fizz".to_string() 6 | } else if num % 5 == 0 { 7 | "Buzz".to_string() 8 | } else { 9 | num.to_string() 10 | } 11 | } 12 | 13 | fn main() { 14 | for num in 0..100 { 15 | println!("{}", fizzbuzz(num)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /step_7/src/main.rs: -------------------------------------------------------------------------------- 1 | fn fizzbuzz(num: i32) -> String { 2 | if num % 15 == 0 { 3 | "FizzBuzz".to_string() 4 | } else if num % 3 == 0 { 5 | "Fizz".to_string() 6 | } else if num % 5 == 0 { 7 | "Buzz".to_string() 8 | } else { 9 | num.to_string() 10 | } 11 | } 12 | 13 | fn main() { 14 | let result = (0..100) 15 | .map(fizzbuzz) 16 | .fold(String::from(""), |acc, line| format!("{}\n{}", acc, line)); 17 | println!("{}", result); 18 | } 19 | -------------------------------------------------------------------------------- /explain_move/src/main.rs: -------------------------------------------------------------------------------- 1 | struct User { 2 | name: String, 3 | } 4 | 5 | fn some_action_to_user(user: &User) { 6 | let tmp = user; 7 | // 何かアクションをする 8 | println!("{}", tmp.name); 9 | } 10 | 11 | fn main() { 12 | let user = User { 13 | name: String::from("user_a"), 14 | }; 15 | // 関数に user を渡すと、所有権がこの関数に移ってしまう。 16 | some_action_to_user(&user); 17 | // なので、この時点では user はもう main 関数には所有権がなくなっている。 18 | // したがってコンパイルエラーとなる。 19 | println!("one more: {}", user.name); 20 | } 21 | -------------------------------------------------------------------------------- /grep_1/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | 3 | fn grep(content: String, pattern: String) { 4 | for line in content.lines() { 5 | if line.contains(pattern.as_str()) { 6 | println!("{}", line); 7 | } 8 | } 9 | } 10 | 11 | fn run(path: String, pattern: String) { 12 | match read_to_string(path) { 13 | Ok(content) => grep(content, pattern), 14 | Err(reason) => println!("{}", reason), 15 | } 16 | } 17 | 18 | fn main() { 19 | let pattern = std::env::args().nth(1); 20 | let path = std::env::args().nth(2); 21 | 22 | match (pattern, path) { 23 | (Some(pattern), Some(path)) => run(path, pattern), 24 | _ => println!("pattern or path is not specified!"), 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /grep_3/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | use structopt::StructOpt; 3 | 4 | #[derive(StructOpt)] 5 | #[structopt(name = "rsgrep")] 6 | struct GrepArgs { 7 | #[structopt(name = "PATTERN")] 8 | pattern: String, 9 | #[structopt(name = "PATTERN")] 10 | path: String, 11 | } 12 | 13 | fn grep(content: String, pattern: String) { 14 | for line in content.lines() { 15 | if line.contains(pattern.as_str()) { 16 | println!("{}", line); 17 | } 18 | } 19 | } 20 | 21 | fn run(state: GrepArgs) { 22 | match read_to_string(state.path) { 23 | Ok(content) => grep(content, state.pattern), 24 | Err(reason) => println!("{}", reason), 25 | } 26 | } 27 | 28 | fn main() { 29 | run(GrepArgs::from_args()); 30 | } 31 | -------------------------------------------------------------------------------- /grep_4/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | use structopt::StructOpt; 3 | 4 | #[derive(StructOpt)] 5 | #[structopt(name = "rsgrep")] 6 | struct GrepArgs { 7 | #[structopt(name = "PATTERN")] 8 | pattern: String, 9 | #[structopt(name = "PATTERN")] 10 | path: Vec, 11 | } 12 | 13 | fn grep(content: String, pattern: &String) { 14 | for line in content.lines() { 15 | if line.contains(pattern.as_str()) { 16 | println!("{}", line); 17 | } 18 | } 19 | } 20 | 21 | fn run(state: GrepArgs) { 22 | for path in state.path.iter() { 23 | match read_to_string(path) { 24 | Ok(content) => grep(content, &state.pattern), 25 | Err(reason) => println!("{}", reason), 26 | } 27 | } 28 | } 29 | 30 | fn main() { 31 | run(GrepArgs::from_args()); 32 | } 33 | -------------------------------------------------------------------------------- /grep_5/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | 3 | use structopt::StructOpt; 4 | 5 | #[derive(StructOpt)] 6 | #[structopt(name = "rsgrep")] 7 | struct GrepArgs { 8 | #[structopt(name = "PATTERN")] 9 | pattern: String, 10 | #[structopt(name = "FILE")] 11 | path: Vec, 12 | } 13 | 14 | fn grep(content: &str, pattern: &str, path: &str) { 15 | for line in content.lines() { 16 | if line.contains(pattern) { 17 | println!("{}: {}", path, line); 18 | } 19 | } 20 | } 21 | 22 | fn run(state: GrepArgs) { 23 | for path in state.path.iter() { 24 | match read_to_string(path) { 25 | Ok(content) => grep(&content, &state.pattern, path), 26 | Err(reason) => println!("{}", reason), 27 | } 28 | } 29 | } 30 | 31 | fn main() { 32 | run(GrepArgs::from_args()); 33 | } 34 | -------------------------------------------------------------------------------- /grep_6/src/main.rs: -------------------------------------------------------------------------------- 1 | use rayon::prelude::*; 2 | use std::fs::read_to_string; 3 | use structopt::StructOpt; 4 | 5 | #[derive(StructOpt)] 6 | #[structopt(name = "rsgrep")] 7 | struct GrepArgs { 8 | #[structopt(name = "PATTERN")] 9 | pattern: String, 10 | #[structopt(name = "FILE")] 11 | path: Vec, 12 | } 13 | 14 | fn grep(content: &str, pattern: &str, path: &str) { 15 | for line in content.lines() { 16 | if line.contains(pattern) { 17 | println!("{}: {}", path, line); 18 | } 19 | } 20 | } 21 | 22 | fn run(state: GrepArgs) { 23 | state 24 | .path 25 | .par_iter() 26 | .for_each(|file| match read_to_string(file) { 27 | Ok(content) => grep(&content, &state.pattern, file), 28 | Err(reason) => println!("{}", reason), 29 | }); 30 | } 31 | 32 | fn main() { 33 | run(GrepArgs::from_args()); 34 | } 35 | -------------------------------------------------------------------------------- /grep_2/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::read_to_string; 2 | 3 | struct GrepArgs { 4 | pattern: String, 5 | path: String, 6 | } 7 | 8 | impl GrepArgs { 9 | fn new(path: String, pattern: String) -> GrepArgs { 10 | GrepArgs { path, pattern } 11 | } 12 | } 13 | 14 | fn grep(content: String, pattern: String) { 15 | for line in content.lines() { 16 | if line.contains(pattern.as_str()) { 17 | println!("{}", line); 18 | } 19 | } 20 | } 21 | 22 | fn run(state: GrepArgs) { 23 | match read_to_string(state.path) { 24 | Ok(content) => grep(content, state.pattern), 25 | Err(reason) => println!("{}", reason), 26 | } 27 | } 28 | 29 | fn main() { 30 | let pattern = std::env::args().nth(1); 31 | let path = std::env::args().nth(2); 32 | 33 | match (pattern, path) { 34 | (Some(pattern), Some(path)) => run(GrepArgs::new(path, pattern)), 35 | _ => println!("patterh or path is not specified!"), 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ansi_term" 7 | version = "0.11.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 10 | dependencies = [ 11 | "winapi", 12 | ] 13 | 14 | [[package]] 15 | name = "atty" 16 | version = "0.2.14" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 19 | dependencies = [ 20 | "hermit-abi", 21 | "libc", 22 | "winapi", 23 | ] 24 | 25 | [[package]] 26 | name = "autocfg" 27 | version = "1.0.1" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 30 | 31 | [[package]] 32 | name = "bitflags" 33 | version = "1.2.1" 34 | source = "registry+https://github.com/rust-lang/crates.io-index" 35 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 36 | 37 | [[package]] 38 | name = "cat_1" 39 | version = "0.1.0" 40 | 41 | [[package]] 42 | name = "cat_2" 43 | version = "0.1.0" 44 | 45 | [[package]] 46 | name = "cfg-if" 47 | version = "1.0.0" 48 | source = "registry+https://github.com/rust-lang/crates.io-index" 49 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 50 | 51 | [[package]] 52 | name = "clap" 53 | version = "2.33.3" 54 | source = "registry+https://github.com/rust-lang/crates.io-index" 55 | checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" 56 | dependencies = [ 57 | "ansi_term", 58 | "atty", 59 | "bitflags", 60 | "strsim", 61 | "textwrap", 62 | "unicode-width", 63 | "vec_map", 64 | ] 65 | 66 | [[package]] 67 | name = "crossbeam-channel" 68 | version = "0.5.1" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" 71 | dependencies = [ 72 | "cfg-if", 73 | "crossbeam-utils", 74 | ] 75 | 76 | [[package]] 77 | name = "crossbeam-deque" 78 | version = "0.8.0" 79 | source = "registry+https://github.com/rust-lang/crates.io-index" 80 | checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" 81 | dependencies = [ 82 | "cfg-if", 83 | "crossbeam-epoch", 84 | "crossbeam-utils", 85 | ] 86 | 87 | [[package]] 88 | name = "crossbeam-epoch" 89 | version = "0.9.5" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" 92 | dependencies = [ 93 | "cfg-if", 94 | "crossbeam-utils", 95 | "lazy_static", 96 | "memoffset", 97 | "scopeguard", 98 | ] 99 | 100 | [[package]] 101 | name = "crossbeam-utils" 102 | version = "0.8.5" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" 105 | dependencies = [ 106 | "cfg-if", 107 | "lazy_static", 108 | ] 109 | 110 | [[package]] 111 | name = "either" 112 | version = "1.6.1" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 115 | 116 | [[package]] 117 | name = "explain_move" 118 | version = "0.1.0" 119 | 120 | [[package]] 121 | name = "grep_1" 122 | version = "0.1.0" 123 | 124 | [[package]] 125 | name = "grep_2" 126 | version = "0.1.0" 127 | 128 | [[package]] 129 | name = "grep_2_5" 130 | version = "0.1.0" 131 | dependencies = [ 132 | "structopt", 133 | ] 134 | 135 | [[package]] 136 | name = "grep_4" 137 | version = "0.1.0" 138 | dependencies = [ 139 | "structopt", 140 | ] 141 | 142 | [[package]] 143 | name = "grep_5" 144 | version = "0.1.0" 145 | dependencies = [ 146 | "rayon", 147 | "structopt", 148 | ] 149 | 150 | [[package]] 151 | name = "grep_6" 152 | version = "0.1.0" 153 | dependencies = [ 154 | "structopt", 155 | ] 156 | 157 | [[package]] 158 | name = "heck" 159 | version = "0.3.3" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 162 | dependencies = [ 163 | "unicode-segmentation", 164 | ] 165 | 166 | [[package]] 167 | name = "hermit-abi" 168 | version = "0.1.19" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 171 | dependencies = [ 172 | "libc", 173 | ] 174 | 175 | [[package]] 176 | name = "lazy_static" 177 | version = "1.4.0" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 180 | 181 | [[package]] 182 | name = "libc" 183 | version = "0.2.98" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "320cfe77175da3a483efed4bc0adc1968ca050b098ce4f2f1c13a56626128790" 186 | 187 | [[package]] 188 | name = "memoffset" 189 | version = "0.6.4" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" 192 | dependencies = [ 193 | "autocfg", 194 | ] 195 | 196 | [[package]] 197 | name = "num_cpus" 198 | version = "1.13.0" 199 | source = "registry+https://github.com/rust-lang/crates.io-index" 200 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 201 | dependencies = [ 202 | "hermit-abi", 203 | "libc", 204 | ] 205 | 206 | [[package]] 207 | name = "proc-macro-error" 208 | version = "1.0.4" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 211 | dependencies = [ 212 | "proc-macro-error-attr", 213 | "proc-macro2", 214 | "quote", 215 | "syn", 216 | "version_check", 217 | ] 218 | 219 | [[package]] 220 | name = "proc-macro-error-attr" 221 | version = "1.0.4" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 224 | dependencies = [ 225 | "proc-macro2", 226 | "quote", 227 | "version_check", 228 | ] 229 | 230 | [[package]] 231 | name = "proc-macro2" 232 | version = "1.0.27" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038" 235 | dependencies = [ 236 | "unicode-xid", 237 | ] 238 | 239 | [[package]] 240 | name = "quote" 241 | version = "1.0.9" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" 244 | dependencies = [ 245 | "proc-macro2", 246 | ] 247 | 248 | [[package]] 249 | name = "rayon" 250 | version = "1.5.1" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" 253 | dependencies = [ 254 | "autocfg", 255 | "crossbeam-deque", 256 | "either", 257 | "rayon-core", 258 | ] 259 | 260 | [[package]] 261 | name = "rayon-core" 262 | version = "1.9.1" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" 265 | dependencies = [ 266 | "crossbeam-channel", 267 | "crossbeam-deque", 268 | "crossbeam-utils", 269 | "lazy_static", 270 | "num_cpus", 271 | ] 272 | 273 | [[package]] 274 | name = "scopeguard" 275 | version = "1.1.0" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 278 | 279 | [[package]] 280 | name = "step_1" 281 | version = "0.1.0" 282 | 283 | [[package]] 284 | name = "step_2" 285 | version = "0.1.0" 286 | 287 | [[package]] 288 | name = "step_3" 289 | version = "0.1.0" 290 | 291 | [[package]] 292 | name = "step_4" 293 | version = "0.1.0" 294 | 295 | [[package]] 296 | name = "step_5" 297 | version = "0.1.0" 298 | 299 | [[package]] 300 | name = "step_6" 301 | version = "0.1.0" 302 | 303 | [[package]] 304 | name = "step_7" 305 | version = "0.1.0" 306 | 307 | [[package]] 308 | name = "strsim" 309 | version = "0.8.0" 310 | source = "registry+https://github.com/rust-lang/crates.io-index" 311 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 312 | 313 | [[package]] 314 | name = "structopt" 315 | version = "0.3.22" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "69b041cdcb67226aca307e6e7be44c8806423d83e018bd662360a93dabce4d71" 318 | dependencies = [ 319 | "clap", 320 | "lazy_static", 321 | "structopt-derive", 322 | ] 323 | 324 | [[package]] 325 | name = "structopt-derive" 326 | version = "0.4.15" 327 | source = "registry+https://github.com/rust-lang/crates.io-index" 328 | checksum = "7813934aecf5f51a54775e00068c237de98489463968231a51746bbbc03f9c10" 329 | dependencies = [ 330 | "heck", 331 | "proc-macro-error", 332 | "proc-macro2", 333 | "quote", 334 | "syn", 335 | ] 336 | 337 | [[package]] 338 | name = "syn" 339 | version = "1.0.73" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7" 342 | dependencies = [ 343 | "proc-macro2", 344 | "quote", 345 | "unicode-xid", 346 | ] 347 | 348 | [[package]] 349 | name = "textwrap" 350 | version = "0.11.0" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 353 | dependencies = [ 354 | "unicode-width", 355 | ] 356 | 357 | [[package]] 358 | name = "unicode-segmentation" 359 | version = "1.8.0" 360 | source = "registry+https://github.com/rust-lang/crates.io-index" 361 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 362 | 363 | [[package]] 364 | name = "unicode-width" 365 | version = "0.1.8" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" 368 | 369 | [[package]] 370 | name = "unicode-xid" 371 | version = "0.2.2" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 374 | 375 | [[package]] 376 | name = "vec_map" 377 | version = "0.8.2" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 380 | 381 | [[package]] 382 | name = "version_check" 383 | version = "0.9.3" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" 386 | 387 | [[package]] 388 | name = "winapi" 389 | version = "0.3.9" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 392 | dependencies = [ 393 | "winapi-i686-pc-windows-gnu", 394 | "winapi-x86_64-pc-windows-gnu", 395 | ] 396 | 397 | [[package]] 398 | name = "winapi-i686-pc-windows-gnu" 399 | version = "0.4.0" 400 | source = "registry+https://github.com/rust-lang/crates.io-index" 401 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 402 | 403 | [[package]] 404 | name = "winapi-x86_64-pc-windows-gnu" 405 | version = "0.4.0" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 408 | --------------------------------------------------------------------------------