Просмотр исходного кода

bin/gatewayd: Finalize features refactor.

parazyd 4 лет назад
Родитель
Сommit
5d777d22dd
4 измененных файлов с 50 добавлено и 22 удалено
  1. 1 3
      bin/gatewayd/.gitignore
  2. 11 18
      bin/gatewayd/Cargo.toml
  3. 37 0
      bin/gatewayd/Makefile
  4. 1 1
      bin/gatewayd/src/main.rs

+ 1 - 3
bin/gatewayd/.gitignore

@@ -1,3 +1 @@
-
-/target
-Cargo.lock
+target

+ 11 - 18
bin/gatewayd/Cargo.toml

@@ -1,29 +1,22 @@
 [package]
-name = "gateway"
-version = "0.1.0"
+name = "gatewayd"
+version = "0.2.0"
 edition = "2021"
 
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+[dependencies.darkfi]
+path= "../../"
+features = ["node", "cli"]
 
 [dependencies]
-darkfi = {path= "../../", features= ["node", "chain"] }
-
 # Async
+smol = "1.2.5"
 async-std = "1.10.0"
 async-channel = "1.6.1"
-easy-parallel = "3.1.0"
 async-executor = "1.4.1"
-futures = "0.3.17"
-smol = "1.2.5"
+easy-parallel = "3.2.0"
 
-# Utilities
-clap = { version = "3.0.0", features = ["derive"] }
+# Misc
+clap = {version = "3.0.7", features = ["derive"]}
 log = "0.4.14"
-num_cpus = "1.13.0"
-simplelog = "0.11.1"
-thiserror = "1.0.30"
-rand = "0.8.4"
-
-# Encoding and parsing
-bytes = "1.1.0"
-url = "2.2.2"
+num_cpus = "1.13.1"
+simplelog = "0.11.2"

+ 37 - 0
bin/gatewayd/Makefile

@@ -0,0 +1,37 @@
+.POSIX:
+
+# Cargo binary
+CARGO = cargo
+
+# Binary to be built
+BIN = gatewayd
+
+# Dependencies which should force the binaries to be rebuilt
+BINDEPS = \
+	Cargo.toml \
+	$(shell find src -type f) \
+	$(shell find ../../sql -type f) \
+	$(shell find ../../contrib/token -type f)
+
+all: $(BIN)
+
+$(BIN): $(BINDEPS)
+	$(CARGO) build --release --all-features
+	cp -f target/release/$@ $@
+
+check: $(BINDEPS)
+	$(CARGO) hack check --release --feature-powerset --no-dev-deps
+
+fix:
+	$(CARGO) clippy --release --all-features --fix --allow-dirty
+
+clippy:
+	$(CARGO) clippy --release --all-features
+
+test:
+	$(CARGO) test --release --all-features
+
+clean:
+	rm -f $(BIN)
+
+.PHONY: all check fix clippy test clean

+ 1 - 1
bin/gatewayd/src/main.rs

@@ -7,7 +7,7 @@ use log::debug;
 use simplelog::{ColorChoice, LevelFilter, TermLogger, TerminalMode};
 
 use darkfi::{
-    chain::{rocks::columns, Rocks, RocksColumn},
+    blockchain::{rocks::columns, Rocks, RocksColumn},
     cli::{CliGatewayd, Config, GatewaydConfig},
     node::service::gateway::GatewayService,
     util::{expand_path, join_config_path},