├── loops ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── enums ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── errors ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── control_flow ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── hello_world ├── main.rs └── README.md ├── traits ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── structs ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── borrowing ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── ownership ├── README.md ├── src │ └── main.rs └── Cargo.toml ├── strings ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── functions ├── README.md ├── src │ └── main.rs └── Cargo.toml ├── variables ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── collections ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── compound ├── README.md ├── Cargo.toml └── src │ └── main.rs ├── scalars ├── Cargo.toml ├── README.md └── src │ └── main.rs ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── SUPPORT.md ├── README.md └── SECURITY.md /loops/README.md: -------------------------------------------------------------------------------- 1 | # Loops 2 | -------------------------------------------------------------------------------- /enums/README.md: -------------------------------------------------------------------------------- 1 | # Enums 2 | 3 | -------------------------------------------------------------------------------- /errors/README.md: -------------------------------------------------------------------------------- 1 | # Error handling -------------------------------------------------------------------------------- /control_flow/README.md: -------------------------------------------------------------------------------- 1 | # Control flow -------------------------------------------------------------------------------- /hello_world/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | println!("Hello, world!"); 3 | } -------------------------------------------------------------------------------- /traits/README.md: -------------------------------------------------------------------------------- 1 | # Traits 2 | 3 | This directory contains a simple program to help build your understanding of **traits**. 4 | 5 | Use `cargo run` to run the program. -------------------------------------------------------------------------------- /structs/README.md: -------------------------------------------------------------------------------- 1 | # Structs 2 | 3 | This directory contains a simple program to help build your understanding of **structs.** 4 | 5 | Use `cargo run` to run the program. -------------------------------------------------------------------------------- /borrowing/README.md: -------------------------------------------------------------------------------- 1 | # Borrowing 2 | 3 | This directory contains a simple program to help build your understanding of **borrowing**. 4 | 5 | Use `cargo run` to run the program. -------------------------------------------------------------------------------- /ownership/README.md: -------------------------------------------------------------------------------- 1 | # Ownership 2 | 3 | This directory contains a simple program to help build your understanding of **ownership**. 4 | 5 | Use `cargo run` to run the program. -------------------------------------------------------------------------------- /strings/README.md: -------------------------------------------------------------------------------- 1 | # Strings 2 | 3 | This directory contains a simple program to help build your understanding of **strings.** 4 | 5 | Use `cargo run` to run the program. 6 | -------------------------------------------------------------------------------- /functions/README.md: -------------------------------------------------------------------------------- 1 | # Functions 2 | 3 | This directory contains a simple program to help build your understanding of **functions.** 4 | 5 | Use `cargo run` to run the program. 6 | -------------------------------------------------------------------------------- /variables/README.md: -------------------------------------------------------------------------------- 1 | # Variables 2 | 3 | This directory contains a simple program to help build your understanding of **variables.** 4 | 5 | Use `cargo run` to run the program. 6 | -------------------------------------------------------------------------------- /collections/README.md: -------------------------------------------------------------------------------- 1 | # Collections 2 | 3 | This directory contains a simple program to help build your understanding of **collections.** 4 | 5 | Use `cargo run` to run the program. 6 | -------------------------------------------------------------------------------- /compound/README.md: -------------------------------------------------------------------------------- 1 | # Compound Data 2 | 3 | This directory contains a simple program to help build your understanding of **compound data.** 4 | 5 | Use `cargo run` to run the program. 6 | -------------------------------------------------------------------------------- /functions/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | last_char(String::from("Hello")); 3 | } 4 | 5 | fn last_char(string: String) -> char { 6 | if string.is_empty() { 7 | return '🚨'; 8 | } 9 | string.chars().next_back().unwrap() 10 | } 11 | -------------------------------------------------------------------------------- /ownership/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let mut say = String::from("Ca"); 3 | 4 | say.push_str("t"); 5 | 6 | let say2 = say; 7 | 8 | // This line will return an error 9 | // println!("{}", say); 10 | 11 | println!("{}", say2); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /compound/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "compound" 3 | version = "0.1.0" 4 | authors = ["Ryan Levick "] 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 | -------------------------------------------------------------------------------- /enums/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "enums" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /loops/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "loops" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /strings/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "strings" 3 | version = "0.1.0" 4 | authors = ["Ryan Levick "] 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 | -------------------------------------------------------------------------------- /traits/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "traits" 3 | version = "0.1.0" 4 | authors = ["Nell Shamrell "] 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 | -------------------------------------------------------------------------------- /errors/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "errors" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /functions/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "functions" 3 | version = "0.1.0" 4 | authors = ["Ryan Levick "] 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 | -------------------------------------------------------------------------------- /scalars/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "scalars" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /structs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "structs" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /borrowing/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "borrowing" 3 | version = "0.1.0" 4 | authors = ["Nell Shamrell "] 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 | -------------------------------------------------------------------------------- /collections/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "collections" 3 | version = "0.1.0" 4 | authors = ["Ryan Levick "] 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 | -------------------------------------------------------------------------------- /ownership/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ownership" 3 | version = "0.1.0" 4 | authors = ["Nell Shamrell "] 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 | -------------------------------------------------------------------------------- /variables/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "variables" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /control_flow/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "control_flow" 3 | version = "0.1.0" 4 | authors = ["meaghanlewis "] 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 | -------------------------------------------------------------------------------- /scalars/README.md: -------------------------------------------------------------------------------- 1 | # Scalars 2 | 3 | Use this program to help build your understanding of **scalar data types.** 4 | 5 | Use cargo to build and run this program by running `cargo run`. 6 | 7 | As a challenge: 8 | 9 | - Fix the warnings in this program 10 | - Explore how to define and use more scalars 11 | -------------------------------------------------------------------------------- /enums/src/main.rs: -------------------------------------------------------------------------------- 1 | enum WebEvent { 2 | PageLoad, 3 | PageUnload, 4 | KeyPress(char), 5 | Paste(String), 6 | Click {x:i64, y:i64}, 7 | } 8 | 9 | enum Option { 10 | Some(T), 11 | None, 12 | } 13 | 14 | fn main() { 15 | let quit = WebEvent::KeyPress('q'); 16 | 17 | let something = Some(1); 18 | } 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | **/target/ 4 | 5 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 6 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 7 | Cargo.lock 8 | 9 | # These are backup files generated by rustfmt 10 | **/*.rs.bk 11 | -------------------------------------------------------------------------------- /variables/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let mut x = 1; 3 | println!("The value of x is: {}", x); 4 | x = 2; 5 | println!("The value of x is: {}", x); 6 | 7 | let y = true; 8 | println!("The value of y is: {}", y); 9 | let y = false; 10 | println!("The value of y is: {}", y); 11 | 12 | const STRING: &str = "hello"; 13 | println!("The value of the string constant is: {}", STRING); 14 | } 15 | -------------------------------------------------------------------------------- /scalars/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let a = 5; //i32 3 | let b: u8 = 1; 4 | 5 | let x = 2.0; 6 | let y: f32 = 3.0; 7 | 8 | let sum = a + b; 9 | 10 | let difference = x - 1.0; 11 | 12 | let product = 4 * a; 13 | 14 | let quotient = 9.0/y; 15 | 16 | let remainder = a % b; 17 | 18 | let t = true; 19 | let f:bool = false; 20 | 21 | let c = '😍'; 22 | let d:char = 'à'; 23 | } 24 | -------------------------------------------------------------------------------- /borrowing/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let say = String::from("Cat"); 3 | print_out(&say); 4 | println!("Again: {}", say); 5 | 6 | let mut my_vec = vec![1, 2, 3]; 7 | println!("{:?}", my_vec); 8 | add_to_vec(&mut my_vec); 9 | println!("{:?}", my_vec); 10 | } 11 | 12 | fn print_out(to_print: &String) { 13 | println!("{}", to_print); 14 | } 15 | 16 | fn add_to_vec(a_vec: &mut Vec) { 17 | a_vec.push(4); 18 | } -------------------------------------------------------------------------------- /loops/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 3 | let mut i = 1; 4 | let something = loop { 5 | i *= 2; 6 | if i > 100 { 7 | break i; 8 | } 9 | }; 10 | assert_eq!(something, 128); 11 | 12 | let mut counter = 0; 13 | 14 | while counter < 10 { 15 | println!("hello"); 16 | counter = counter + 1; 17 | } 18 | 19 | for item in 0..5 { 20 | println!("{}", item*2); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /strings/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let text = String::from("Hello\nworld\n!"); 3 | let upper = text.to_uppercase(); 4 | let stripped = upper.strip_prefix("HELLO\n").unwrap(); 5 | 6 | println!("{}", first_line(&stripped)) 7 | } 8 | 9 | // pub fn first_line(string: String) -> String { 10 | // string.lines().next().unwrap().to_owned() 11 | // } 12 | 13 | pub fn first_line(string: &str) -> &str { 14 | string.lines().next().unwrap() 15 | } 16 | -------------------------------------------------------------------------------- /hello_world/README.md: -------------------------------------------------------------------------------- 1 | # Hello, World! 2 | 3 | This directory contains a Hello World program. 4 | 5 | Compile this program by running `rustc main.rs`. The Rust compiler will produce a binary executable file in this folder. 6 | 7 | The binary executable can then be run using: 8 | 9 | - `./main` for Unix/Linux users 10 | - `.\main.exe` for Windows users 11 | 12 | After running the executables, you will see the message `Hello, World!` displayed in the output window. 13 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /compound/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let array = [1u32, 2, 3]; 3 | // let array: [u32; 3] = [1u32, 2, 3]; 4 | // let array: [u32; 3] = [1u32, 2, 3, 4]; 5 | 6 | let first_element = array[0]; 7 | // let warning = array[100]; 8 | 9 | let length = "Some text".len(); 10 | [1][length]; 11 | 12 | // let array = [1, 2, true]; 13 | 14 | let tuple = (1u32, 2, true); 15 | // let tuple: (u32, i8, bool) = (1u32, 2, true); 16 | 17 | let first_element = (1, 2, true).0; 18 | // let error = (1, 2, true).100; 19 | } 20 | -------------------------------------------------------------------------------- /structs/src/main.rs: -------------------------------------------------------------------------------- 1 | struct Person { 2 | name: String, 3 | age: u8, 4 | likes_oranges: bool 5 | } 6 | 7 | struct Point2D(u32, u32); 8 | 9 | fn main() { 10 | let person = Person { 11 | name:String::from("Adam"), 12 | likes_oranges: true, 13 | age: 25, 14 | }; 15 | 16 | println!("Person name is: {}", person.name); 17 | 18 | let origin = Point2D(100, 200); 19 | 20 | println!("Point contains {:?} and {:?}", origin.0, origin.1); 21 | 22 | let Point2D(x, y) = origin; 23 | 24 | println!("Point contains {:?} and {:?}", x, y); 25 | } 26 | -------------------------------------------------------------------------------- /control_flow/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | 3 | if 1 == 2 { 4 | println!("math is broken!"); 5 | } else { 6 | println!("everything is fine"); 7 | } 8 | 9 | let formal = true; 10 | let greeting = if formal { 11 | println!("Good evening"); 12 | } else { 13 | println!("Hey, friend"); 14 | }; 15 | 16 | let number = 6; 17 | 18 | if number % 4 == 0 { 19 | println!("number is divisible by 4"); 20 | } else if number % 3 == 0 { 21 | println!("number is divisible by 3"); 22 | } else { 23 | println!("number is not divisible by 4 or 3"); 24 | } 25 | 26 | let boolean = true; 27 | 28 | let binary = match boolean { 29 | false => 0, 30 | true => 1, 31 | }; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /errors/src/main.rs: -------------------------------------------------------------------------------- 1 | use std::fs::File; 2 | 3 | fn main() { 4 | //panic!("Farewell"); 5 | // 6 | //let v = vec![0,1,2,3]; 7 | //println!("{}", v[6]); 8 | 9 | // let fruits = vec!["banana", "apple", "coconut"]; 10 | 11 | // let first = fruits.get(0); 12 | // println!("{:?}", first); 13 | 14 | // let third = fruits.get(2); 15 | // println!("{:?}", third); 16 | 17 | // let non_existent = fruits.get(99); 18 | // println!("{:?}", non_existent); 19 | 20 | // let f = File::open("hello.txt"); 21 | 22 | // let f = match f { 23 | // Ok(file) => file, 24 | // Err(error) => panic!("Can't open the file {:?}", error), 25 | // }; 26 | 27 | //let f = File::open("hello.txt").unwrap(); 28 | 29 | let f = File::open("hello.txt").expect("Failed to open hello.txt"); 30 | } 31 | -------------------------------------------------------------------------------- /traits/src/main.rs: -------------------------------------------------------------------------------- 1 | pub struct Person { 2 | name: String 3 | } 4 | 5 | pub struct Cat { 6 | name: String 7 | } 8 | 9 | pub struct Rabbit { 10 | name: String 11 | } 12 | 13 | pub trait Eat { 14 | fn eat_dinner(&self) { 15 | println!("I eat from a dish") 16 | } 17 | } 18 | 19 | impl Eat for Person { 20 | fn eat_dinner(&self) { 21 | println!("I eat from a plate") 22 | } 23 | } 24 | 25 | impl Eat for Cat { 26 | fn eat_dinner(&self) { 27 | println!("I eat from a cat bowl") 28 | } 29 | } 30 | 31 | impl Eat for Rabbit {} 32 | 33 | fn main() { 34 | 35 | let person = Person { 36 | name: String::from("Nell") 37 | }; 38 | 39 | person.eat_dinner(); 40 | 41 | let cat = Cat { 42 | name: String::from("Marvin") 43 | }; 44 | 45 | cat.eat_dinner(); 46 | 47 | let rabbit = Rabbit { 48 | name: String::from("Leia") 49 | }; 50 | 51 | rabbit.eat_dinner(); 52 | 53 | } -------------------------------------------------------------------------------- /collections/src/main.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | let mut students = vec![Student { 3 | name: String::from("Ryan"), 4 | }]; 5 | 6 | students.push(Student { 7 | name: "Li".to_string(), 8 | }); 9 | 10 | assert!( 11 | &students[0] 12 | == &Student { 13 | name: String::from("Ryan") 14 | } 15 | ); 16 | assert!( 17 | students.get(0) 18 | == Some(&Student { 19 | name: String::from("Ryan") 20 | }) 21 | ); 22 | assert!(students.get(100) == None); 23 | 24 | for student in students.iter() { 25 | println!("Student name: {}", student.name); 26 | } 27 | 28 | use std::collections::HashMap; 29 | 30 | let mut enrollment = HashMap::new(); 31 | enrollment.insert(String::from("biology"), students); 32 | 33 | let bio_students = enrollment.get("biology"); 34 | let bio_students = enrollment.remove("biology"); 35 | } 36 | 37 | #[derive(PartialEq, Eq)] 38 | struct Student { 39 | name: String, 40 | } 41 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /SUPPORT.md: -------------------------------------------------------------------------------- 1 | # TODO: The maintainer of this repo has not yet edited this file 2 | 3 | **REPO OWNER**: Do you want Customer Service & Support (CSS) support for this product/project? 4 | 5 | - **No CSS support:** Fill out this template with information about how to file issues and get help. 6 | - **Yes CSS support:** Fill out an intake form at [aka.ms/spot](https://aka.ms/spot). CSS will work with/help you to determine next steps. More details also available at [aka.ms/onboardsupport](https://aka.ms/onboardsupport). 7 | - **Not sure?** Fill out a SPOT intake as though the answer were "Yes". CSS will help you decide. 8 | 9 | *Then remove this first heading from this SUPPORT.MD file before publishing your repo.* 10 | 11 | # Support 12 | 13 | ## How to file issues and get help 14 | 15 | This project uses GitHub Issues to track bugs and feature requests. Please search the existing 16 | issues before filing new issues to avoid duplicates. For new issues, file your bug or 17 | feature request as a new Issue. 18 | 19 | For help and questions about using this project, please **REPO MAINTAINER: INSERT INSTRUCTIONS HERE 20 | FOR HOW TO ENGAGE REPO OWNERS OR COMMUNITY FOR HELP. COULD BE A STACK OVERFLOW TAG OR OTHER 21 | CHANNEL. WHERE WILL YOU HELP PEOPLE?**. 22 | 23 | ## Microsoft Support Policy 24 | 25 | Support for this **PROJECT or PRODUCT** is limited to the resources listed above. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Beginner's Series to Rust 2 | 3 | ## Overview 4 | 5 | About this series and what to expect. 6 | 7 | ## What you'll learn about in this series 8 | 9 | - Why you should learn Rust 10 | - The Rust community 11 | - How to setup your development environment for Rust 12 | - How to create and run Rust programs 13 | - How to use Cargo 14 | - The different data types and how to use them 15 | - Functions 16 | - Control flow 17 | - Error handling 18 | - Borrowing 19 | - Ownership 20 | - Strings 21 | - Collections 22 | - Traits 23 | 24 | ## Next steps 25 | 26 | If you want to follow along with the series, you can try out the programs in this repository on your own, and check out the resources listed below. 27 | 28 | ## Helpful resources 29 | 30 | To continue your learning, you can refer to the following resources: 31 | 32 | - [Rust suggested learning resources](https://www.rust-lang.org/learn) 33 | - [Microsoft Learn: Rust Learning Path](https://docs.microsoft.com/learn/paths/rust-first-steps/?WT.mc_id=academic-29077-cxa) 34 | - [Exercism: Rust Exercises](https://exercism.io/tracks/rust) 35 | 36 | ## Contributing 37 | 38 | This project welcomes contributions and suggestions. Most contributions require you to agree to a 39 | Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us 40 | the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. 41 | 42 | When you submit a pull request, a CLA bot will automatically determine whether you need to provide 43 | a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions 44 | provided by the bot. You will only need to do this once across all repos using our CLA. 45 | 46 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 47 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 48 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 49 | 50 | ## Trademarks 51 | 52 | This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft 53 | trademarks or logos is subject to and must follow 54 | [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). 55 | Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. 56 | Any use of third-party trademarks or logos are subject to those third-party's policies. 57 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ## Security 4 | 5 | Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). 6 | 7 | If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. 8 | 9 | ## Reporting Security Issues 10 | 11 | **Please do not report security vulnerabilities through public GitHub issues.** 12 | 13 | Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). 14 | 15 | If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). 16 | 17 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). 18 | 19 | Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: 20 | 21 | * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) 22 | * Full paths of source file(s) related to the manifestation of the issue 23 | * The location of the affected source code (tag/branch/commit or direct URL) 24 | * Any special configuration required to reproduce the issue 25 | * Step-by-step instructions to reproduce the issue 26 | * Proof-of-concept or exploit code (if possible) 27 | * Impact of the issue, including how an attacker might exploit the issue 28 | 29 | This information will help us triage your report more quickly. 30 | 31 | If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. 32 | 33 | ## Preferred Languages 34 | 35 | We prefer all communications to be in English. 36 | 37 | ## Policy 38 | 39 | Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). 40 | 41 | --------------------------------------------------------------------------------