Summary

Completed

In this module, you reviewed the basic structure of a Rust program. The main function is the entry point into all Rust programs. The println! macro can be used to show variable values and display program progress. Variables are defined with the let keyword. Their values can be declared as immutable or mutable (changeable) with the mut keyword.

We explored core Rust language concepts, including many primary and compound data types. You studied how to work with integer and floating point numbers, characters and text strings, and boolean true/false values. The Rust language strictly interprets data types. A program only compiles and runs successfully when data types are correctly defined and used.

In the exercise, you wrote a function to build a car by using data stored in a struct and an enum. You looked for instances of the todo! macro in the sample program and completed the code. You used the Rust playground to modify the code, compile the program, and run the executable.

In the next module in this Learning Path, you'll discover more Rust data types, and how to use if/else conditional expressions in a program.

Learn more

Visit the following links to learn more about some of the items we explored in this module:

Rust reference documentation

Rust: Data types

Rust: Concepts