January 2019
Intermediate to advanced
520 pages
14h 32m
English
First, we need to create a new folder where we'll add the necessary dependencies to create our first microservice. Use cargo to make a new project called hyper-microservice:
> cargo new hyper-microservice
Open the created folder and add dependencies to your Cargo.toml file:
[dependencies]hyper = "0.12"
The single dependency is the hyper crate. The latest release of this crate is asynchronous and lies on top of the futures crate. It also uses the tokio crate for runtime, which includes the scheduler, reactor, and asynchronous sockets. Some of the necessary types of the tokio crate are re-exported in the hyper::rt module. The main purpose of hyper is to operate with the HTTP protocol, which means that the crate ...
Read now
Unlock full access