How to do it...

  1. Open the Cargo.toml file that has been generated for you.
  2. Under [dependencies], if you didn't do so in the last recipe, add the following lines:
futures = "0.1.18"hyper = "0.11.21"
  1. If you want, you can go to futures' (https://crates.io/crates/futures) and hyper's (https://crates.io/crates/hyper) crates.io pages to check for the newest version and use that one instead.
  2. In the folder chapter-nine, create a folder called files.
  3. In the folder files, create a file called index.html and add the following code to it:
<!doctype html><html><head>    <link rel="stylesheet" type="text/css" href="/style.css">    <title>Home</title></head><body>    <h1>Home</h1>    <p>Welcome. You can access other files on this web server   aswell! Available links:</p> ...

Get Rust Standard Library Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.