This course is for the beginner who wants to learn how to code without getting overwhelmed by technical jargon and computer science topics. Rust Programming For Beginners is specifically designed to teach the core programming concepts necessary to get started building applications while also providing a solid foundation for future learning.
The best way to learn programming is to write engaging and interesting programs. This course features 30 coding exercises to complement the lectures, and are designed with real-world applications in mind. Each exercise presents a problem with hints on how to implement a solution, so you can get the practice you need to be successful. The exercises are accompanied with a video demonstrating a possible implementation for the exercise, and line-by-line commentary on how the code accomplishes the task and why it works.
The information in this course is introduced in a thoughtful order, which means you will always be aware of what every bit of code in a program is doing, and how it works the way it does. There is no need to wait until later in the course, or to study more advanced topics, in order to fully understand the code when presented. This is accomplished by building up knowledge through concise, easy to follow lectures that can be reviewed quickly.
In this course, you will learn:
Critical concepts necessary to work with code, without overwhelming detail
Creation of digital solutions for real-world problems
Reading and writing application code in the Rust programming language
Utilization of the Rust ecosystem to efficiently develop applications
Automated testing to enhance the reliability of your solutions
How to make your projects easier to work with through the use of generated documentation
Foundational computer science topics such as computer memory, program logic, and simple data structures
This course isn’t just for beginner programmers, but any programmer who wishes to learn Rust. If you have experience coding in a high level memory-managed language such as Python, JavaScript, or C#, then this course is a great introduction to the Rust programming language and it’s unique memory model and syntax.
Sign up today to learn the concepts of programming and how to build applications in Rust!
This course utilizes multiple project files for exercises. The files needed for this course are attached as the activities.zip file. If you wish to download the solutions for the exercises, they are available in the activities-solutions.zip file. Alternatively, you may clone the linked git repository for both the activity files & solutions to the activities.
Windows users should also download and install the Microsoft Visual C++ build tools from https://visualstudio.microsoft.com/visual-cpp-build-tools/ and ensure that "MSVC" and "Windows 10 SDK" are checked. This can be confirmed by clicking "Modify" after installation.
This lecture explains what a data type is and some examples of basic data types, along with how they look in code. After watching this lecture, you will be able to identify a data type by looking at it's declaration.
This lecture explains what a variable is and some examples of how to create a variable in code. After watching this lecture, you will be able to identify and write variables in code.
This lecture explains the basics of a function. After watching this lecture, you will be able to identify parts of a function, understand how they operate, and utilize them in code.
This lecture explains what a macro is and how the println macro can be utilized. After watching this lecture, you will be able to recognize the println macro and use it in your code to display messages.
This lecture explains how logic can be utilized for decision making within programs. After watching this video, you will be able to implement decision making processes based on various criteria within your programs.
This lecture explains how actions are performed multiple times within programs. After watching this video, you will be able to implement looping within your programs which will terminate after a specific condition is met.
This lecture explains how to create code comments within code. After watching this video, you will be able to write code comments that add important information that is not conveyed within your code.
This coding exercise provides practice on implementing your own functions.
Instructions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a1.rs file. Try solving the problem presented in the a1.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding demo shows how different math operators. After watching this demo, you will be able to perform mathematical operations in your programs.
This coding exercise provides practice on performing mathematical operations within a program.
Instructions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a2.rs file. Try solving the problem presented in the a2.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding exercise provides practice on controlling the flow of code execution in your program.
Instructions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a3a.rs file. Try solving the problem presented in the a3a.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding exercise provides additional practice on controlling the flow of code execution in your program.
Instructions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a3b.rs file. Try solving the problem presented in the a3b.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains how more robust logic can be implemented within a program. After watching this video, you will be able to implement logic that can be checked by the Rust compiler which will provide a higher degree of reliability to your programs.
This coding demo shows an implementation of robust logic using the match keyword. After watching this video, you will have a better understanding of how to utilize the match keyword.
This coding exercise provides practice on logical control flow utilizing the match keyword.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a4a.rs file. Try solving the problem presented in the a4a.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding exercise provides additional practice on logical control flow utilizing the match keyword.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a4b.rs file. Try solving the problem presented in the a4b.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding demo shows how code can be repeated using the loop keyword. After watching this demo, you will be able to create you own loops in a program.
This coding exercise provides practice on repeatedly executing code based on specific conditions.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a5.rs file. Try solving the problem presented in the a5.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding demo shows how code can be repeated using the while loop construct. After watching this demo, you will be able to create you own loops that automatically exit when a specific condition is met.
This coding exercise provides practice on implementing your own loop that can automatically terminate once a specific condition is met.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a6.rs file. Try solving the problem presented in the a6.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains what an enumeration is, and why they are important. After watching this lecture, you will be able to identify and create enumerations in code.
This coding demo walks through the implementation of an enumeration. After watching this video, you will have a better understanding of how to create your own enumerations in your programs.
This coding exercise provides practice for creating your own enumeration.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a7.rs file. Try solving the problem presented in the a7.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explain what a structure is, why they are important, and how they differ from enumerations. After watching this video, you will be able to implement your own structure which can help manage data within code.
This coding demo walks through the creation of a structure. After watching this video, you will have a better understanding of how to implement a structure.
This coding exercise provides practice for implementing your own structure.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a8.rs file. Try solving the problem presented in the a8.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains what a tuple is and how they can be utilized to organize data. After watching this video, you will be able to use and identify tuples within programs.
This coding demo walks through the creation of a tuple. After watching this video, you will have a better understanding of how to implement tuples within your programs.
This coding exercise provides practice for utilizing tuples.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a9.rs file. Try solving the problem presented in the a9.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains what an expression is and how they can be used with other keywords in the language. After watching this video, you will understand how data flows through your code.
This coding demo walks through expressions line-by-line. After watching this video, you will have a better understanding of expressions and be better equipped to utilize them in your programs.
This coding exercise provides practice on utilizing expressions.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a10.rs file. Try solving the problem presented in the a10.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains how data is stored in memory and how the data can be accessed. After watching this video, you will be able to use indices to access data in memory.
This lecture explains the concepts of data ownership. After watching this video, you will have a better understanding of how data flows through your program and be better equipped to handle more advanced topics.
This coding demo walks through line-by-line how ownership works by showing how some data flows through a program. After watching this video, you will be better equipped to handle ownership problems within your programs.
This exercise provides practice on ownership semantics.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a11.rs file. Try solving the problem posed in the a11.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This coding demo shows how to implement functionality on a structure. After watching this video, you will be able to implement and use functionality on a structure.
This coding exercise provides practice on implementing functionality on a structure.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a12.rs file. Try solving the problem presented in the a12.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains how to work with multiple similar pieces of data. After watching this video, you will be able to utilize vectors to store multiple pieces of data.
This coding demo shows the creation of a vector and how how access the data within. After watching this video, you will have a better understanding of storing data within a vector, and how to operate upon the data.
This coding exercise provides practice on creating and utilizing a vector.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a13.rs file. Try solving the problem presented in the a13.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains how to work with different types of strings. After watching this video, you will be able to store a string within a structure and convert to and from owned and borrowed strings.
This demo walks through code line-by-line showing a string being stored in a struct, and conversions between strings and string slices. After watching this video, you will have a better understanding of how to work with strings in your programs.
This coding exercise provides practice on working with strings.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a14.rs file. Try solving the problem presented in the a14.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This code walk-through shows how functionality can be automatically implemented on structures and enumerations. After watching this video, you will be able to derive functionality on structure and enumerations.
This lecture explains what type annotations are. After watching this video, you will be able to annotate variables with a specific data type.
This lecture explains how data can be stored within an enumeration. After watching this video, you will be able to create enumerations which can store additional pieces of data.
This coding demo explains working with associated enumeration data line-by-line . After watching this video, you will be able to create and access data within an enumeration using the match keyword.
This coding exercise provides practice on creating and working with an enumeration which contains additional data.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a15.rs file. Try solving the problem presented in the a15.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains the concept of optional data. After watching this video, you will be able to utilize optional data within your programs.
This coding demo shows how optional data can be created and accessed while explaining how it works line-by-line. After watching this video, you will have a better understanding of how to implement optional data within your programs.
This coding exercise provides practice on working with optional data.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a16.rs file. Try solving the problem presented in the a16.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This demo shows how specialized comments can be written in your programs to help with documentation. After watching this video, you will be able to generate documentation based on comments written in your code.
This demo shows how to access the Rust standard library documentation. After watching this video, you will be able to access the Rust documentation, and be able to search for specific functionality within the standard library.
This coding exercise provides practice on searching the Rust standard library documentation, and utilizing located functionality.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a17.rs file. Try solving the problem presented in the a17.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains what the Result type is in Rust. After watching this video, you will be able to leverage the Result type to handle errors in your program.
This demo walks through the utilization of the Result type. After watching this video, you will have a better understanding of how to work with a Result.
This code exercise provides practice for working with the Result data type.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a18.rs file. Try solving the problem presented in the a18.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This code exercise provides additional practice for working with the Result data type.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a18b.rs file. Try solving the problem presented in the a18b.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This lecture explains what a HashMap is, and how to use it. After watching this video, you will be able to create, access, and iterate through the values stored within a HashMap.
This demo walks through the creation and usage of a HashMap line-by-line. After watching this video, you will have a better understanding of how and when to utilize HashMaps.
This code exercise provides practice for working with a HashMap.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a19.rs file. Try solving the problem presented in the a19.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This video demonstrates how user input may be gathered by explaining the process line-by-line. After watching this video, you will be able to obtain user input from a terminal and handle any errors that may occur from doing so.
This code exercise provides practice for working with user input and handling possible error conditions.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a20.rs file. Try solving the problem presented in the a20.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This code exercise is a small project utilizing many of the concepts learned thus far to create a fully working application based on a series of user requirements. After completing the project, you will have an understanding of how to design and implement a complete and useful application.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the p1.rs file. Try solving the problem presented in the p1.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.'
The completed solution presented in the video is available in the p1-example.rs file.
This line-by-line code demonstration shows how to work with anonymous functions (closures). After watching this video, you will be able to identify, create, and use your own closures.
This code walk-through shows how to easily convert one data type to another. After watching this video, you will be able to use the map combinator to transform data from one type to another.
This code exercise provides practice for working with the map combinator.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a21.rs file. Try solving the problem presented in the a21.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This line-by-line code demo shows how code can be organized. After watching this video, you will be able to better organize your code into modules which will make it easier to navigate your projects.
This code demonstration shows how programs can be automatically tested. After watching this video, you will be able to write and run automated tests on your projects to ensure high code reliability.
This code exercise provides practice on implementing tests for your code.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a22.rs file. Try solving the problem presented in the a22.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This demonstration shows how combinators on the Option data type can be utilized. After watching this video, you will be able to easily transform the Option data type into other types of data.
This code exercise provides practice for working with Option combinators.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a23.rs file. Try solving the problem presented in the a23.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This code demo show line-by-line how iterators operate. After watching this video, you will be able to utilize iterators in your programs in order to transform multiple pieces of data.
This code exercise provides practice for working with iterators.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a24.rs file. Try solving the problem presented in the a24.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This code demo shows line-by-line how to create a range of numbers. After watching this video, you will be able to use the range syntax to create a range of numbers.
This lecture covers the concept of similar functionality, called traits in the Rust language. After watching this video, you will be able to write your own traits for your programs.
This demo shows how a trait can be created line-by-line and then utilized within a program. After watching this video, you will have a better understand of how and when to use traits.
This code exercise provides practice for working with traits.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a25.rs file. Try solving the problem presented in the a25.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This demo shows special syntax for working with types that have additional data, such as Option and Result. After watching with video, you will be able to use the if..let syntax to more easily work with various data types.
This demo walks through code line-by-line showing a special looping syntax. After watching this video, you will be able to use the while..let syntax to iterate over various data types.
This demo shows how third-party code can be included in your projects. After watching this video, you will be able to include external crates (others' code) in your projects.
This coding exercise provides practice for working with third-party code.
Directions
If you have not already done so, download and extract the activities.zip file from Lecture 1 containing all the exercises for this course. Once extracted, open the activities folder in the Visual Studio Code editor and then open the a26.rs file. Try solving the problem presented in the a26.rs file on your own, and then refer to the video for a solution to the problem and for additional content about the topic.
This demo walks-through the code necessary for implementing default values for data types. After watching this video, you will be able to set a default value for your custom data types.
This coding demonstration shows how the const keyword can be utilized. After watching this video, you will be able to create shared values that are the same across your entire application.
This demo shows how modules can be saved to another file. After watching this video, you will be able to organize your code using multiple files within a single project.