Chapter 7: Implementing Terminal I/O in Rust
In the previous chapter, we looked at how to work with files and directories. We also built a shell command in Rust that generates consolidated source code metrics for Rust source files in a project directory.
In this chapter, we will look at building terminal-based applications in Rust. Terminal applications are an integral part of many software programs, including games, text editors, and terminal emulators. For developing these types of programs, it helps to understand how to build customized terminal interface-based applications. This is the focus of this chapter.
For this chapter, we will review the basics of how terminals work, and then look at how to perform various types of actions on a terminal, such as setting colors and styles, performing cursor operations (such as clearing and positioning), and working with keyboard and mouse inputs.
We will cover the topics in the following order:
- Introducing terminal I/O fundamentals...