Chapter 2: A Tour of the Rust Programming Language
In the previous chapter, we looked at the Rust tooling ecosystem for build and dependency management, testing, and documentation. These are critical and highly developer-friendly tools that give us a strong foundation for starting to work on Rust projects. In this chapter, we will build a working example that will serve to act as a refresher, and also strengthen key Rust programming concepts.
The goal of this chapter is to get more proficient in core Rust concepts. This is essential before diving into the specifics of systems programming in Rust. We will achieve this by designing and developing a command-line interface (CLI) in Rust.
The application we will be building is an arithmetic expression evaluator. Since this is a mouthful, let's see an example.
Let's assume the user enters the following arithmetic expression on the command line:
1+2*3.2+(4/2-3/2)-2.11+2^4
The tool will print out the result 21.79.
...