We will have to install the following nickel crate before we can go ahead and spawn a web server. Follow the given steps to download and set up the nickel and rustc_serialize crates for your project:
- We will require the Rust compiler and any text editor to develop the Rust code snippet.
- Create a Rust project using the Cargo tool and enter the newly created project:
cargo new nickel-jsonhandling --bin && cd nickel- jsonhandling
Take a look at the following screenshot:
- Open the Cargo.toml file in your favorite text editor and make the modification shown in the following screenshot. Here, we are using the nickel and rustc-serialize crates, which are entered in the dependencies field:
- Install the crate in your project using the following command:
cargo build
This command will install all the dependencies of the nickel and rustc-serialize crate in your Rust project.