├── .gitignore ├── samples ├── src │ └── main.rs ├── Cargo.toml ├── examples │ └── course_5 │ │ └── produce_consumer_tokio.rs └── Cargo.lock ├── docs ├── students.md └── mentors.md ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .idea/ -------------------------------------------------------------------------------- /samples/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } 4 | -------------------------------------------------------------------------------- /samples/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "course-rust" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [dependencies] 7 | tokio = { version = "1", features = ["full"] } 8 | 9 | [[bin]] 10 | name = "course_5_produce_consumer_tokio" 11 | path = "examples/course_5/produce_consumer_tokio.rs" 12 | -------------------------------------------------------------------------------- /docs/students.md: -------------------------------------------------------------------------------- 1 | # For students to follow 2 | 3 | 1. Fork this repo and do all your commits in there 4 | 2. Make sure you're on the chat or other communication channels with the rest of the team 5 | 6 | ## Reading the weekly chapter 7 | 8 | - Locate the chapter GitHub issue in the course [project](https://github.com/orgs/xoriors/projects/3) or in [Issues](https://github.com/xoriors/course-rust/issues). Let's say it's the [Chapter 1-3](#4) 9 | - Read the corresponding week number chapter from [The Rust Book](https://doc.rust-lang.org/book/) 10 | - Ask any questions in the GH issue or on the chat 11 | 12 | ## How to submit your weekly home assignments 13 | 14 | Fork the repo or create a new branch in this repo. 15 | 16 | - Locate the chapter assignment for the GitHub issue in the course [project](https://github.com/orgs/xoriors/projects/3) or in [Issues](https://github.com/xoriors/course-rust/issues). Let's say it's [Chapter 1-3: Assignment](#5) 17 | - Create a new folder with your GitHub account ID in [/assignments/Chapter_1-3/solutions](../assignments/Chapter_1-3/solutions), replacing `Chapter_1-3` with the corresponding week's chapters 18 | - Add the needed files to complete the assignment 19 | - Create a PR back to this repo for the `main` branch, titled with the assignment issue title and including `#ID`. Also, add the assignment issue ID as `#ID` in the PR's description. 20 | In this case, the title is `Chapter 1-3: Assignment #5 `, and the id to add to the description is `#5` (this will be converted to a link to the issue by GitHub on view) 21 | - Assign the PR to mentors for review 22 | - Follow up on any comments and questions, pushing additional changes to the PR's branch until the PR is merged 23 | 24 | ## Final project 25 | 26 | - After the course is finished, the course project will have a final project assignment. Please complete that based on your availability and ask any questions in the issue or on chat 27 | - While working on it, please follow the steps from [How to submit your weekly home assignments](#How-to-submit-your-weekly-home-assignments) 28 | 29 | -------------------------------------------------------------------------------- /samples/examples/course_5/produce_consumer_tokio.rs: -------------------------------------------------------------------------------- 1 | /* 2 | Task: Implement an async worker pool that executes tasks concurrently using Tokio. 3 | Requirements: 4 | 5 | The pool should spawn N worker threads. 6 | Implement a method submit_task(task: fn() -> ()) that executes a function in a worker. 7 | Use tokio::sync::mpsc to queue tasks. 8 | Use tokio::task::spawn for execution. 9 | */ 10 | use std::sync::Arc; 11 | use std::time::Duration; 12 | use tokio::sync::mpsc::Sender; 13 | use tokio::sync::{Mutex, mpsc}; 14 | use tokio::task; 15 | use tokio::time::sleep; 16 | 17 | struct WorkerPool { 18 | tx: Sender>, 19 | } 20 | 21 | impl WorkerPool { 22 | async fn new(worker_count: usize) -> Self { 23 | // Initialize pool 24 | let (tx, rx) = mpsc::channel::>(100); // Channel for task submission 25 | let rx = Arc::new(Mutex::new(rx)); // Wrap in Mutex for shared access 26 | 27 | for _ in 0..worker_count { 28 | let rx_clone = rx.clone(); 29 | task::spawn(async move { 30 | while let Some(task) = rx_clone.lock().await.recv().await { 31 | tokio::task::spawn(async move { 32 | task() // Execute the task 33 | }) 34 | .await 35 | .unwrap_or_else(|e| { 36 | eprintln!("Task execution failed: {:?}", e); 37 | }); 38 | } 39 | }); 40 | } 41 | 42 | WorkerPool { tx } 43 | } 44 | 45 | async fn submit_task(&self, task: fn() -> ()) { 46 | self.tx 47 | .clone() 48 | .send(Box::new(task)) 49 | .await 50 | .unwrap_or_else(|e| { 51 | eprintln!("Failed to submit task: {:?}", e); 52 | }); 53 | } 54 | } 55 | 56 | #[tokio::main] 57 | async fn main() { 58 | let pool = WorkerPool::new(4).await; 59 | 60 | pool.submit_task(|| println!("Task 1 executed")).await; 61 | pool.submit_task(|| println!("Task 2 executed")).await; 62 | 63 | sleep(Duration::from_secs(1)).await; 64 | } 65 | -------------------------------------------------------------------------------- /docs/mentors.md: -------------------------------------------------------------------------------- 1 | # For the mentors to follow 2 | 3 | ## Course setup 4 | 5 | 1. Make sure you're on the chat or other communication channels with the rest of the team 6 | 2. At the beginning of each course, make sure the material is ready in [/docs](.) and [/assignments](../assignments) 7 | 3. [/assignments](../assignments) structure (usually this exists already. Make sure it's valid and change as needed): 8 | A folder for each chapters group, like `Chapter_1-3` with the following structure: 9 | - `requirements` folder: Containing a file called `Chapter_N-M_assignment.md` with the requirements and any other needed resources 10 | - `solutions` folder: This folder will contain folders with each student's GitHub account ID, each containing submissions from each student, each with an associated PR. 11 | Make sure this folder is empty so it will contain the solutions from this session 12 | 4. Create a new project called `course-`, where `` is the course's year, mostly the current year 13 | - Create GitHub issues for each chapter and assignment, adding all needed docs with relevant links to any resources. All issue descriptions should have a link to [students.md] 14 | - For the final project, create an assignment issue titled `Final project` and have the requirements in 15 | 16 | ## Into the course, for each week 17 | 18 | 1. Create a GH issue for the theory part for the given chapters for the next week session, like `Course 4` and include the table of contents of the chapters 19 | 2. Create a GH issue for the home assignment for the given chapters for the last week session, like `Course 1-3` and include the requirements and any needed files in there 20 | 3. Have the weekly call of about 2h to discuss: 21 | - Review last week's assignment (this corresponds to the chapter from 2 weeks back); let's call it `Chapter N-2: Assignment`. After this is done, mark the issue as `Done` 22 | - Discuss this week's chapters, `Chapter 1-3` clarifying any questions 23 | - New home assignment for this week's chapters. Show them the GH issue for it and instruct them to create PR in there and ask their questions 24 | - Intro to ds and show the GH issue for it, instructing the students to add their questions in there 25 | - live coding or present building part of the course main app related to last week's chapters knowledge 26 | 4. 27 | 5. 28 | 6. After this is done, mark the issue as `Done` 29 | 7. Give the assignment for last week's chapter (this is called this week's assignment), discuss any questions, and set the issue's status to `In Progress` 30 | 8. Move to this week's chapter, `Chapter 3: `, and do a short intro. Mark the status `In Progress` for the current chapter. 31 | 9. This is where the call ends 32 | 10. Over the week, resolve any comments and questions in the week's chapter and assignment issues and on Slack 33 | 11. Record everything and save videos in `videos/Chapter_N` 34 | 35 | ## Final project 36 | 37 | Follow similar assignment steps to `Into the course, for each week`, ignoring the chapter steps. 38 | 39 | ## After the course 40 | 41 | - After all issues and discussions have been resolved, create a new branch called `course-<year>`, where `<year>` is the course's year 42 | - Close the project for this year from project settings 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # course-rust 2 | 3 | This course is based on [The Rust Book](https://doc.rust-lang.org/book/). We also add practical examples for each chapter, weekly assignments, and final projects. 4 | 5 | > [!IMPORTANT] 6 | > **WORK IN PROGRESS** 7 | > 8 | > The main idea of this repo is to give you, at a minimum: 9 | > - A complete Rust course based on `The Rust Book` 10 | > - Additional practical examples and assignments 11 | > - Docs, logistics, a project, and GitHub issues to organize the course interactively 12 | > - All this Free and Open Source (FOSS) 13 | 14 | ## Prerequesites 15 | 16 | - Conversational English is mandatory 17 | - You should be familiar with the basics of programming, algorithms and data structures, and another programming language, preferably with any of C/C++, Go, Java, Kotlin, Python, Haskell, JavaScript, TypeSript or similar 18 | - Know how to use GitHub 19 | - Curiosity, able to learn by yourself 20 | - No specific higher education level is needed 21 | 22 | ## Advantages of taking the course 23 | 24 | - **Why should I take this course:** - To be initiated in Rust, to understand some advanced programming concepts better 25 | - **What does the course offer**: - Technical support, Recommended courses, Guided self-learning, Flexibility in organizing your learning schedule, free, no obligations 26 | - **What does the course NOT offer** - Certification, assisted learning, job opportunities 27 | 28 | ## What this course gives you and what is **NOT** 29 | 30 | ### What it gives you: 31 | 32 | - Useful materials to help you learn Rust 33 | - Short weekly interactive calls (2h) with teachers to teach you and answer your questions 34 | - Technical support and ability to talk the mentors to them over GitHub issues or chat over the week 35 | - Practical examples and weekly assignments 36 | - It's free, with no obligations 37 | 38 | ### What it's **NOT**: 39 | 40 | - Exhaustive learning course with everyday sessions with teachers 41 | - Paid course 42 | - Learn at your own pace 43 | - It doesn't offer you a job 44 | 45 | ## Structure 46 | 47 | - Will last for min 8 weeks + final project 48 | - Each week, students will read a few chapters from `The Rust Book` 49 | - Home assignments for read chapters. You're encouraged to also [learn by doing](https://github.com/xoriors/course-rust/wiki/Additional-resources#learn-by-doing) using these resources 50 | - Will build a project from scratch for the whole duration of the course (a mini-Redis distributed on replica mode with a load balancer) run from CLI as server and client, and also as libraries 51 | - Every week, we'll have a 2h call where we: 52 | - Discuss last week's assignment 53 | - Discuss the last week's chapter and address any questions (this will also happen over the week via Slack or GitHub issues) 54 | - Briefly present and discuss the next week's course 55 | - Discuss practical examples 56 | - Live coding or present building part of the course main app related to last week's chapters knowledge 57 | - Give a new assignment for last week's chapter 58 | - Over the week, students may ask any questions over the chat 59 | - Weekly calls will be video recorded and made available in this repo for anybody to use 60 | 61 | # What you will be able to build from scratch after you take the course 62 | 63 | - Relational SQL database 64 | - NoSQL Verisioned key-value/document database 65 | - URL shortener 66 | - Website/service health checker 67 | - Encrypted filesystem 68 | - Distributed filesystem 69 | - File sync service 70 | - Load balancer 71 | - Proxy 72 | 73 | ### Chapters 74 | 75 | Foreword 76 | Introduction 77 | 1. Getting Started 78 | 2. Programming a Guessing Game 79 | 3. Common Programming Concepts 80 | 4. Understanding Ownership 81 | 5. Using Structs to Structure Related Data 82 | 6. Enums and Pattern Matching 83 | 7. Managing Growing Projects with Packages, Crates, and Modules 84 | 8. Common Collections 85 | 9. Error Handling 86 | 10. Generic Types, Traits, and Lifetimes 87 | 11. Writing Automated Tests 88 | 12. An I/O Project: Building a Command Line Program 89 | 13. Functional Language Features: Iterators and Closures 90 | 14. More about Cargo and Crates.io 91 | 15. Smart Pointers 92 | 16. Fearless Concurrency 93 | 17. Object Oriented Programming Features of Rust 94 | 18. Patterns and Matching 95 | 19. Advanced Features 96 | 20. Final Project: Building a Multithreaded Web Server 97 | 21. Appendix 98 | 99 | ### Additional material 100 | 101 | Please see [Wiki](https://github.com/xoriors/course-rust/wiki). 102 | 103 | ## Into the course 104 | 105 | - [For mentors](docs/mentors.md). 106 | - [For students](docs/students.md). 107 | 108 | ## Get in touch 109 | 110 | If you’re interested, join xorio on [Discord](https://discord.com/invite/3W3mwWvz8y) and select `Rust course` and others you're interested in. 111 | There will be several mentors. 112 | 113 | If you’re interested in other courses not found there, in `#courses` see the form in the channel's description, vote for which ones you want, and we will organize them based on demand. We are collecting your email so we can notify you when we organize them, and we will post them in the hashtag#courses channel. 114 | -------------------------------------------------------------------------------- /samples/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "autocfg" 22 | version = "1.4.0" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 25 | 26 | [[package]] 27 | name = "backtrace" 28 | version = "0.3.75" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" 31 | dependencies = [ 32 | "addr2line", 33 | "cfg-if", 34 | "libc", 35 | "miniz_oxide", 36 | "object", 37 | "rustc-demangle", 38 | "windows-targets", 39 | ] 40 | 41 | [[package]] 42 | name = "bitflags" 43 | version = "2.9.1" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 46 | 47 | [[package]] 48 | name = "bytes" 49 | version = "1.10.1" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 52 | 53 | [[package]] 54 | name = "cfg-if" 55 | version = "1.0.0" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 58 | 59 | [[package]] 60 | name = "course-rust" 61 | version = "0.1.0" 62 | dependencies = [ 63 | "tokio", 64 | ] 65 | 66 | [[package]] 67 | name = "gimli" 68 | version = "0.31.1" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 71 | 72 | [[package]] 73 | name = "libc" 74 | version = "0.2.172" 75 | source = "registry+https://github.com/rust-lang/crates.io-index" 76 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 77 | 78 | [[package]] 79 | name = "lock_api" 80 | version = "0.4.12" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 83 | dependencies = [ 84 | "autocfg", 85 | "scopeguard", 86 | ] 87 | 88 | [[package]] 89 | name = "memchr" 90 | version = "2.7.4" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 93 | 94 | [[package]] 95 | name = "miniz_oxide" 96 | version = "0.8.8" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 99 | dependencies = [ 100 | "adler2", 101 | ] 102 | 103 | [[package]] 104 | name = "mio" 105 | version = "1.0.4" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" 108 | dependencies = [ 109 | "libc", 110 | "wasi", 111 | "windows-sys 0.59.0", 112 | ] 113 | 114 | [[package]] 115 | name = "object" 116 | version = "0.36.7" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 119 | dependencies = [ 120 | "memchr", 121 | ] 122 | 123 | [[package]] 124 | name = "parking_lot" 125 | version = "0.12.3" 126 | source = "registry+https://github.com/rust-lang/crates.io-index" 127 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 128 | dependencies = [ 129 | "lock_api", 130 | "parking_lot_core", 131 | ] 132 | 133 | [[package]] 134 | name = "parking_lot_core" 135 | version = "0.9.10" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 138 | dependencies = [ 139 | "cfg-if", 140 | "libc", 141 | "redox_syscall", 142 | "smallvec", 143 | "windows-targets", 144 | ] 145 | 146 | [[package]] 147 | name = "pin-project-lite" 148 | version = "0.2.16" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 151 | 152 | [[package]] 153 | name = "proc-macro2" 154 | version = "1.0.95" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 157 | dependencies = [ 158 | "unicode-ident", 159 | ] 160 | 161 | [[package]] 162 | name = "quote" 163 | version = "1.0.40" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 166 | dependencies = [ 167 | "proc-macro2", 168 | ] 169 | 170 | [[package]] 171 | name = "redox_syscall" 172 | version = "0.5.12" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" 175 | dependencies = [ 176 | "bitflags", 177 | ] 178 | 179 | [[package]] 180 | name = "rustc-demangle" 181 | version = "0.1.24" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 184 | 185 | [[package]] 186 | name = "scopeguard" 187 | version = "1.2.0" 188 | source = "registry+https://github.com/rust-lang/crates.io-index" 189 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 190 | 191 | [[package]] 192 | name = "signal-hook-registry" 193 | version = "1.4.5" 194 | source = "registry+https://github.com/rust-lang/crates.io-index" 195 | checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" 196 | dependencies = [ 197 | "libc", 198 | ] 199 | 200 | [[package]] 201 | name = "smallvec" 202 | version = "1.15.0" 203 | source = "registry+https://github.com/rust-lang/crates.io-index" 204 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 205 | 206 | [[package]] 207 | name = "socket2" 208 | version = "0.5.9" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" 211 | dependencies = [ 212 | "libc", 213 | "windows-sys 0.52.0", 214 | ] 215 | 216 | [[package]] 217 | name = "syn" 218 | version = "2.0.101" 219 | source = "registry+https://github.com/rust-lang/crates.io-index" 220 | checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" 221 | dependencies = [ 222 | "proc-macro2", 223 | "quote", 224 | "unicode-ident", 225 | ] 226 | 227 | [[package]] 228 | name = "tokio" 229 | version = "1.45.1" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" 232 | dependencies = [ 233 | "backtrace", 234 | "bytes", 235 | "libc", 236 | "mio", 237 | "parking_lot", 238 | "pin-project-lite", 239 | "signal-hook-registry", 240 | "socket2", 241 | "tokio-macros", 242 | "windows-sys 0.52.0", 243 | ] 244 | 245 | [[package]] 246 | name = "tokio-macros" 247 | version = "2.5.0" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 250 | dependencies = [ 251 | "proc-macro2", 252 | "quote", 253 | "syn", 254 | ] 255 | 256 | [[package]] 257 | name = "unicode-ident" 258 | version = "1.0.18" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 261 | 262 | [[package]] 263 | name = "wasi" 264 | version = "0.11.0+wasi-snapshot-preview1" 265 | source = "registry+https://github.com/rust-lang/crates.io-index" 266 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 267 | 268 | [[package]] 269 | name = "windows-sys" 270 | version = "0.52.0" 271 | source = "registry+https://github.com/rust-lang/crates.io-index" 272 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 273 | dependencies = [ 274 | "windows-targets", 275 | ] 276 | 277 | [[package]] 278 | name = "windows-sys" 279 | version = "0.59.0" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 282 | dependencies = [ 283 | "windows-targets", 284 | ] 285 | 286 | [[package]] 287 | name = "windows-targets" 288 | version = "0.52.6" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 291 | dependencies = [ 292 | "windows_aarch64_gnullvm", 293 | "windows_aarch64_msvc", 294 | "windows_i686_gnu", 295 | "windows_i686_gnullvm", 296 | "windows_i686_msvc", 297 | "windows_x86_64_gnu", 298 | "windows_x86_64_gnullvm", 299 | "windows_x86_64_msvc", 300 | ] 301 | 302 | [[package]] 303 | name = "windows_aarch64_gnullvm" 304 | version = "0.52.6" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 307 | 308 | [[package]] 309 | name = "windows_aarch64_msvc" 310 | version = "0.52.6" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 313 | 314 | [[package]] 315 | name = "windows_i686_gnu" 316 | version = "0.52.6" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 319 | 320 | [[package]] 321 | name = "windows_i686_gnullvm" 322 | version = "0.52.6" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 325 | 326 | [[package]] 327 | name = "windows_i686_msvc" 328 | version = "0.52.6" 329 | source = "registry+https://github.com/rust-lang/crates.io-index" 330 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 331 | 332 | [[package]] 333 | name = "windows_x86_64_gnu" 334 | version = "0.52.6" 335 | source = "registry+https://github.com/rust-lang/crates.io-index" 336 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 337 | 338 | [[package]] 339 | name = "windows_x86_64_gnullvm" 340 | version = "0.52.6" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 343 | 344 | [[package]] 345 | name = "windows_x86_64_msvc" 346 | version = "0.52.6" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 349 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------