This chapter starts with discussing the large-scale code-organizing structures in Rust, namely modules and crates. ;After working through the material, you'll understand the structure of Rust projects, and be able to build a structured app as well. More specifically, we look at the following topics:
- Building crates
- Defining a module
- Visibility of items
- Importing modules and file hierarchy
- Importing external crates
- Exporting a public interface
- Adding external crates to a project
- Working with random numbers
We will touch upon how to build macros in order to generate code and save time and effort, particularly in these topics:
- Why macros?
- Developing macros
- Using macros from crates
- Some other built-in macros