While JSON is a very human-readable format and easy to work with, many people still prefer a more interactive experience—such as websites. While this is not native to actix-web, some template engines provide seamless integration to minimize the calls required to assemble and output HTML. The major difference compared to simply delivering a static site is that template engines render variable output and Rust code into an augmented HTML page to produce content adapted to whatever the application's state is. In this recipe, we are taking a look at Yet Another Rust Template Engine (Yarte) (https://crates.io/crates/yarte) and its integration with actix-web.
Rendering HTML templates
Getting ready
Create a Rust binary...