Getting started

We'll create a new cargo directory and add DarkFi to our Cargo.toml, like so:

darkfi = {path = "../../../", features = ["net", "toml", "system", "async-daemonize", "rpc"]}
darkfi-serial = {path = "../../../src/serial"}

Be sure to replace the path to DarkFi with the correct path for your setup.

Once that's done we can access DarkFi's net methods inside of dchat. We'll need a few more external libraries too, so add these dependencies:

[dependencies]
darkfi = {path = "../../../", features = ["net", "toml", "system", "async-daemonize", "rpc"]}
darkfi-serial = {path = "../../../src/serial"}

# daemon
easy-parallel = "3.3.1"
signal-hook-async-std = "0.2.2"
signal-hook = "0.3.17"
simplelog = "0.12.2"
smol = "1.3.0"

# arg parsing
serde = {version = "1.0.197", features = ["derive"]}
structopt = "0.3.26"
structopt-toml = "0.5.1"

# misc
async-trait = "0.1.77"
log = "0.4.21"
url = "2.5.0"