Chapter 4: Managing Environment, Command Line, and Time
In the previous chapter, we looked at how the Rust Standard Library is structured. We also wrote a portion of a basic template engine that can generate dynamic HTML page components given an HTML template and data. From here onward, we will start to deep-dive into specific modules of the standard library grouped by functional areas.
In this chapter, we will look at Rust Standard Library modules that pertain to working with system environment, command-line, and time-related functions. The goal of this chapter is for you to gain more proficiency in working with command-line parameters, path manipulation, environment variables, and time measurements.
What is the benefit of learning about these?
Working with command-line arguments is a required skill for writing any program that accepts user inputs from the command line.
Imagine how you would write a tool (such as find or grep) that deals with searching for files and patterns...