1: A new project
In Getting Started with Rust, we will create a Markdown compiler called TinyMD, which will take a markdown file as input, convert the markdown to HTML, then write the HTML to a new file.
To start, let’s create a new project with
cargo, the package manager and
project building tool that comes from installing Rust.
We will scaffold this and all projects in Rust using the
cargo tool, passing
new argument and specifying what we want:
$ cargo new tinymd --bin
cargo new builds a new project, and the
--bin flag tells Cargo
that you want this project built as an executable (called
tinymd) instead of
After running the command, you will get a confirmation that the project was
scaffolded correctly. Go ahead and open the project’s root folder,