fud: moved to bin

This commit is contained in:
aggstam
2022-09-30 00:33:43 +03:00
parent 2af9a7cd8d
commit 07b7d0f148
22 changed files with 94 additions and 34 deletions

2
.gitignore vendored
View File

@@ -18,6 +18,8 @@
/dnetview
/drk
/faucetd
/fu
/fud
/ircd
/tau
/taud

36
Cargo.lock generated
View File

@@ -1912,6 +1912,42 @@ dependencies = [
"winapi",
]
[[package]]
name = "fu"
version = "0.3.0"
dependencies = [
"async-std",
"clap 3.2.22",
"darkfi",
"log",
"serde_json",
"simplelog",
"url",
]
[[package]]
name = "fud"
version = "0.3.0"
dependencies = [
"async-channel",
"async-executor",
"async-std",
"async-trait",
"blake3",
"ctrlc",
"darkfi",
"easy-parallel",
"futures-lite",
"log",
"serde",
"serde_derive",
"serde_json",
"simplelog",
"structopt",
"structopt-toml",
"url",
]
[[package]]
name = "funty"
version = "2.0.0"

View File

@@ -24,6 +24,8 @@ members = [
"bin/darkotc",
"bin/drk",
"bin/faucetd",
"bin/fud/fu",
"bin/fud/fud",
"bin/ircd",
"bin/dnetview",
"bin/daod",

View File

@@ -1,20 +1,24 @@
[package]
name = "fu"
version = "0.3.0"
homepage = "https://dark.fi"
description = "Command-line client for fud"
authors = ["darkfi <dev@dark.fi>"]
repository = "https://github.com/darkrenaissance/darkfi"
license = "AGPL-3.0-only"
version = "0.3.0"
edition = "2021"
authors = ["darkfi <dev@dark.fi>"]
license = "AGPL-3.0-only"
homepage = "https://dark.fi"
repository = "https://github.com/darkrenaissance/darkfi"
keywords = []
categories = []
[dependencies]
darkfi = {path = "../../../", features = ["util", "rpc"]}
# Async
async-std = {version = "1.12.0", features = ["attributes"]}
# Misc
clap = {version = "3.2.20", features = ["derive"]}
darkfi = {path = "../../../../", features = ["util", "rpc"]}
log = "0.4.17"
serde_json = "1.0.85"
simplelog = "0.12.0"
url = "2.3.1"
[workspace]

View File

@@ -1,23 +1,29 @@
[package]
name = "fud"
version = "0.3.0"
homepage = "https://dark.fi"
description = "File-sharing Utility Daemon, using DHT for records discovery."
authors = ["darkfi <dev@dark.fi>"]
repository = "https://github.com/darkrenaissance/darkfi"
license = "AGPL-3.0-only"
version = "0.3.0"
edition = "2021"
authors = ["darkfi <dev@dark.fi>"]
license = "AGPL-3.0-only"
homepage = "https://dark.fi"
repository = "https://github.com/darkrenaissance/darkfi"
keywords = []
categories = []
[dependencies]
darkfi = {path = "../../../", features = ["dht", "rpc"]}
# Async
async-channel = "1.7.1"
async-executor = "1.4.1"
async-std = "1.12.0"
async-trait = "0.1.57"
blake3 = "1.3.1"
ctrlc = { version = "3.2.3", features = ["termination"] }
darkfi = {path = "../../../../", features = ["dht", "rpc"]}
easy-parallel = "3.2.0"
futures-lite = "1.12.0"
# Misc
blake3 = "1.3.1"
log = "0.4.17"
serde_json = "1.0.85"
simplelog = "0.12.0"
@@ -28,5 +34,3 @@ serde = "1.0.145"
serde_derive = "1.0.145"
structopt = "0.3.26"
structopt-toml = "0.5.1"
[workspace]

6
contrib/localnet/fud/clean.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
rm -rf fud0 fud1 lilith_hosts.tsv
mkdir fud0
mkdir fud1
echo "Hello from node 0." > "fud0/node0"
echo "Hello from node 1." > "fud1/node1"

View File

@@ -0,0 +1 @@
Hello from node 0.

View File

@@ -0,0 +1 @@
Hello from node 1.

View File

@@ -0,0 +1,21 @@
#!/bin/sh
set -e
# Start a tmux session with a lilith node and two fud nodes.
if [ "$1" = "-v" ]; then
verbose="-v"
else
verbose=""
fi
tmux new-session -d
tmux send-keys "../../../lilith ${verbose} -c lilith_config.toml" Enter
sleep 2
tmux split-window -v
tmux send-keys "../../../fud ${verbose} -c fud_config0.toml" Enter
sleep 2
tmux select-pane -t 1
tmux split-window -h
tmux send-keys "../../../fud ${verbose} -c fud_config1.toml" Enter
tmux attach

View File

@@ -1 +0,0 @@
Hello from node 0

View File

@@ -1 +0,0 @@
Hello from node 1

View File

@@ -1,15 +0,0 @@
#!/bin/sh
set -e
# Start a tmux session with a lilith node and two fud nodes.
tmux new-session -d
tmux send-keys "../../../../lilith -c lilith_config.toml" Enter
sleep 2
tmux split-window -v
tmux send-keys "../fud/target/debug/fud -c fud_config0.toml" Enter
sleep 2
tmux select-pane -t 1
tmux split-window -h
tmux send-keys "../fud/target/debug/fud -c fud_config1.toml" Enter
tmux attach