Add a binaries feature to the processor to reduce dependencies when used as a lib

processor isn't intended to be used as a library, yet serai-processor-tests
does pull it in as a lib. This caused serai-processor-tests to need to compile
rocksdb, which added multiple minutes to the compilation time.
This commit is contained in:
Luke Parker
2023-11-25 04:02:47 -05:00
parent b296be8515
commit d60e007126
11 changed files with 23 additions and 26 deletions

View File

@@ -39,7 +39,7 @@ env_logger = { version = "0.10", default-features = false, features = ["humantim
# Uses a single threaded runtime since this shouldn't ever be CPU-bound
tokio = { version = "1", default-features = false, features = ["rt", "time", "macros"] }
serai-db = { path = "../common/db", optional = true }
serai-db = { path = "../common/db", features = ["rocksdb"], optional = true }
serai-env = { path = "../common/env" }
@@ -49,4 +49,4 @@ jsonrpsee = { version = "0.16", default-features = false, features = ["server"],
simple-request = { path = "../common/request", default-features = false }
[features]
binaries = ["serai-db", "serai-db/rocksdb", "jsonrpsee"]
binaries = ["serai-db", "jsonrpsee"]