├── LICENSE ├── .devcontainer └── devcontainer.json ├── lab.md ├── README.md └── assets └── banner.svg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Alfredo Deza 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 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/rust 3 | { 4 | "name": "Rust", 5 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 6 | "image": "mcr.microsoft.com/devcontainers/rust:0-1-bullseye", 7 | "customizations": { 8 | "vscode": { 9 | "extensions": [ 10 | "rust-lang.rust-analyzer", 11 | "vadimcn.vscode-lldb", 12 | "GitHub.copilot" 13 | ] 14 | } 15 | } 16 | 17 | // Use 'mounts' to make the cargo cache persistent in a Docker Volume. 18 | // "mounts": [ 19 | // { 20 | // "source": "devcontainer-cargo-cache-${devcontainerId}", 21 | // "target": "/usr/local/cargo", 22 | // "type": "volume" 23 | // } 24 | // ] 25 | 26 | // Features to add to the dev container. More info: https://containers.dev/features. 27 | // "features": {}, 28 | 29 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 30 | // "forwardPorts": [], 31 | 32 | // Use 'postCreateCommand' to run commands after the container is created. 33 | // "postCreateCommand": "rustc --version", 34 | 35 | // Configure tool-specific properties. 36 | // "customizations": {}, 37 | 38 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 39 | // "remoteUser": "root" 40 | } 41 | -------------------------------------------------------------------------------- /lab.md: -------------------------------------------------------------------------------- 1 | # Week 1 Assignments 2 | This week you'll apply concepts related to setting up your environment. From installing Rust, to using GitHub Copilot and configuring your text editor with Codespaces. These assignments are designed to help you get comfortable with the tools you'll be using throughout the course. 3 | 4 | ## Assignment 1: Install Rust with Visual Studio Code 5 | In this assignment, you'll install Rust and configure Visual Studio Code with the Rust Analyzer extension. 6 | 7 | ### Steps 8 | 1. Install Rust using the [Rustup](https://rustup.rs/) installer. 9 | 2. [Install Visual Studio Code](https://code.visualstudio.com/Download?WT.mc_id=academic-0000-alfredodeza) 10 | 3. Install the [Rust Analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer&WT.mc_id=academic-0000-alfredodeza) extension for Visual Studio Code. 11 | 12 | ### Artifacts 13 | Because this is a configuration-only assignment, there are no artifacts to submit. At the end of this assignment you should have a working Rust installation and Visual Studio Code configured with the Rust Analyzer extension. 14 | 15 | ## Assignment 2: Enable GitHub Copilot 16 | In this assignment, you'll enable GitHub Copilot for your GitHub account. You'll also install the GitHub Copilot extension for Visual Studio Code. 17 | 18 | ### Steps 19 | 1. [Sign up for GitHub Copilot](https://techcommunity.microsoft.com/t5/educator-developer-blog/step-by-step-setting-up-github-student-and-github-copilot-as-an/ba-p/3736279?WT.mc_id=academic-0000-alfredodeza) 20 | 2. Install the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot&WT.mc_id=academic-0000-alfredodeza) extension for Visual Studio Code. 21 | 22 | ### Artifacts 23 | For this assignment, you'll have a GitHub repository with a single `main.rs` file that you'll create with a single function produced with the help of GitHub Copilot. Additionally, you'll include a `README.md` that describes the function and at least one aspect of Copilot that you found interesting. 24 | 25 | ## Assignment 3: Configure Visual Studio Code with Codespaces 26 | This is the last assignment for this week. In this assignment, you'll configure [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-0000-alfredodeza) with [Codespaces](https://docs.github.com/en/codespaces/overview). 27 | 28 | ### Steps 29 | 1. Use Visual Studio Code to create a new Codespace configuration with dev containers. 30 | 2. Use the Rust image for the configuration 31 | 3. Add the Rust Analyzer and GitHub Copilot extensions to the configuration. 32 | 33 | ### Artifacts 34 | 1. A GitHub repository with a `.devcontainer` directory with the configuration files for your Codespace. 35 | 2. A `README.md` file that describes the configuration and how to use it. 36 | 3. The repository has to be fully functional with Codespaces and you should be able to run it from the browser. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Pragmatic AI Labs Course](./assets/banner.svg)](https://ds500.paiml.com/bootcamps/rust/ "Join the Bootcamp") 2 | 3 | # Rust development environment setup 4 | 5 | _Rust Bootcamp week 1: Setting up your development environment_ 6 | 7 | This week, you will learn how to optimize your Rust development workflow using powerful tools such as programming suggestions, prompts with Copilot, and GitHub Codespaces. By diving into the lessons on programming with suggestions, using prompts with Copilot, and exploring the fundamentals of Codespaces, you will acquire the skills to streamline your coding process and collaborate more efficiently with others. 8 | 9 | This is the first week of the Rust Bootcamp. There are 4 weeks in total: 10 | 11 | - [week 1](https://github.com/alfredodeza/rust-setup) 👈 You are here! 12 | - [week 2](https://github.com/alfredodeza/rust-fundamentals) 13 | - [week 3](https://github.com/alfredodeza/rust-structs-types-enums/) 14 | - [week 4](https://github.com/alfredodeza/applied-rust) 15 | 16 | 💡 Are you just looking for a 👉 [Rust template](https://github.com/alfredodeza/rust-template) to get started easily with a project? The [template](https://github.com/alfredodeza/rust-template) has everything you need! 17 | 18 | ## Is Rust difficult to learn? 19 | Contrary to what some think, Rust is not actually more difficult to learn than other languages including Python and TypeScript. In fact, [Google gathered data from its own engineers to understand how difficult it is to learn Rust](https://opensource.googleblog.com/2023/06/rust-fact-vs-fiction-5-insights-from-googles-rust-journey-2022.html). The final report found that most engineers felt proficient in Rust in 2 months or less, where some would feel proficient in as little as 3 weeks! 20 | 21 | 🚀 **Watch the Video course** 22 | 23 | [![DS500](https://ds500.paiml.com/assets/social/g6u1k.png)](https://ds500.paiml.com/learn/course/g6u1k/ "Rust Fundamentals Course") 24 | 25 | ## Contents 26 | This week has several references to supporting content that can help you setup your environment. Make sure you have Rust installed and you are using [Visual Studio Code](https://code.visualstudio.com/?WT.mc_id=academic-0000-alfredodeza). 27 | 28 | This repository is [Codespaces](https://docs.github.com/en/codespaces/overview) *ready*, and it is set as a template repository. You can create a new repository from this template and start working on your own with Codespaces. This means that Rust, Copilot, and all the extensions are already installed and configured for you. 29 | 30 | :fire: If you need a quick reference for Codespaces and configuration with Visual Studio Code, feel free to reuse the [configuration files](./.devcontainer) in this repository. 31 | 32 | ### Lesson 1: Setting up your text editor 33 | - [Rust on Visual Studio Code](https://code.visualstudio.com/docs/languages/rust?WT.mc_id=academic-0000-alfredodeza) 34 | - [Install Rust on Windows](https://learn.microsoft.com/windows/dev-environment/rust/setup?WT.mc_id=academic-0000-alfredodeza) 35 | - [RustUp the toolchaing installer](https://rustup.rs/) 36 | - [Rust Analyzer extension](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer&WT.mc_id=academic-0000-alfredodeza) 37 | 38 | Assignment: [Setting-up-your-text-editor](./lab.md#assignment-1-install-rust-with-visual-studio-code) 39 | 40 | ### Lesson 2: Using AI pair-programming 41 | - [GitHub Copilot](https://docs.github.com/en/copilot/quickstart) 42 | - [Copilot for Students and Educators](https://aka.ms/Copilot4Students) 43 | - [Introduction to GitHub Copilot](https://learn.microsoft.com/training/modules/introduction-to-github-copilot/?WT.mc_id=academic-0000-alfredodeza) 44 | 45 | Assignment: [Enable GitHub Copilot](./lab.md#Assignment-2-Enable-GitHub-Copilot) 46 | 47 | ### Lesson 3: Codespaces for Rust 48 | - [Introduction to Codespaces](https://learn.microsoft.com/training/modules/work-azure-repos-github/6-develop-online-github-codespaces?WT.mc_id=academic-0000-alfredodeza) 49 | - [Codespaces for students](https://techcommunity.microsoft.com/t5/educator-developer-blog/what-is-github-codespaces-and-how-can-students-access-it-for/ba-p/3676103?WT.mc_id=academic-0000-alfredodeza) 50 | - [Managing quotas](https://techcommunity.microsoft.com/t5/educator-developer-blog/how-to-optimize-your-codespaces-pro-tips-for-managing-quotas/ba-p/3712032?WT.mc_id=academic-0000-alfredodeza) 51 | 52 | ### Lesson 4: Practice Lab 53 | 54 | Use the [included lab](./lab.md) for this week to apply the concepts you've learned. The [lab](./lab.md) lab has 3 parts that are all relevant for what you've learned this week. 55 | 56 | ## Resources 57 | 58 | - [Rust Book](https://doc.rust-lang.org/book/) 59 | - [First steps with Rust Learning Path](https://learn.microsoft.com/training/paths/rust-first-steps/?WT.mc_id=academic-0000-alfredodeza) 60 | - [DevOps command-line tools in Python and Rust](https://learning.oreilly.com/videos/devops-command-line-tools/28037639VIDEOPAIML/) 61 | 62 | **Coursera Courses** 63 | 64 | - [MLOps Machine Learning Operations Specialization](https://www.coursera.org/specializations/mlops-machine-learning-duke) 65 | - [Linux and Bash for Data Engineering](https://www.coursera.org/learn/linux-and-bash-for-data-engineering-duke) 66 | - [Open Source Platforms for MLOps](https://www.coursera.org/learn/open-source-platforms-duke) 67 | - [Python Essentials for MLOps](https://www.coursera.org/learn/python-essentials-mlops-duke) 68 | - [Web Applications and Command-Line tools for Data Engineering](https://www.coursera.org/learn/web-app-command-line-tools-for-data-engineering-duke) 69 | - [Python and Pandas for Data Engineering](https://www.coursera.org/learn/python-and-pandas-for-data-engineering-duke) 70 | - [Scripting with Python and SQL for Data Engineering](https://www.coursera.org/learn/scripting-with-python-sql-for-data-engineering-duke) 71 | -------------------------------------------------------------------------------- /assets/banner.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1039 | 1040 | 1041 | 1042 | Pragmatic AI Labs 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | BOOTCAMP 1051 | 1052 | 1053 | --------------------------------------------------------------------------------