3: Strings & memory
Our tiny markdown compiler is only just being born. We’ve got a project setup, and if we run the program we are able to output a banner—a block of helpful text that usually says what the program is, who wrote it, and how to use it. By the end of the last chapter, we were outputting the version of our program.
In this chapter, we will improve our banner by pulling data from the project’s
manifest file (
Cargo.toml). To do this, we need to understand how Rust deals
with strings and the concept of memory ownership.