Getting to know the initial setup for fusing code
In this section, we will cover the initial setup of two fusing pieces of code we built in Chapter 2, Designing Your Web Application in Rust, and Chapter 3, Handling HTTP Requests. This fusion will give us the following structure:
Figure 4.1 – Structure of our app and its modules
Here, we will register all the modules in the main file and then pull all these modules into the views to be used. We are essentially swapping the command-line interface from Chapter 2, Designing Your Web Application in Rust, with web views. Combining these modules gives us the following files in the code base:
├── main.rs ├── processes.rs ├── state.rs
We are then bolting our to_do
module into the same directory of our main.rs
file. If you built the to_do
module when reading Chapter 2, Designing Your Web Application in Rust, your to_do
module should have...