Adding the necessary dependencies

Create a new crate and add the following dependencies:

[dependencies]
clap = "2.32"
diesel = { version = "^1.1.0", features = ["sqlite", "r2d2"] }
failure = "0.1"
r2d2 = "0.8"
serde = "1.0"
serde_derive = "1.0"
uuid = { version = "0.5", features = ["serde", "v4"] }

We have added the clap, r2d2, and serde crates along with the serde_derive crate. We also need the uuid crate for generating user IDs. We also added the diesel crate with the following features:

  • sqlite: To adapt the crate to use the SQLite database
  • r2d2: To use a pool instead of a plain connection

The next thing you need is the diesel_cli tool.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.194.123