Skip to content

Commit

Permalink
chore: self review, simplify features
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Mar 1, 2024
1 parent d419afb commit 1e9689d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
10 changes: 9 additions & 1 deletion abci/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ description = """tenderdash-abci provides a simple framework with which to build
low-level applications on top of Tenderdash."""

[features]
default = ["server", "docker-tests", "crypto", "tcp", "unix", "tracing-span"]
default = [
"server",
"docker-tests",
"crypto",
"tcp",
"unix",
"grpc",
"tracing-span",
]
# docker-tests includes integration tests that require docker to be available
docker-tests = ["server"]
server = [
Expand Down
2 changes: 1 addition & 1 deletion abci/tests/grpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tenderdash_abci::proto;
use tonic::{async_trait, Response, Status};

#[cfg(feature = "docker-tests")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[tokio::test]
/// Test server listening on ipv4 address.
///
/// See [tcp_server_test()].
Expand Down
11 changes: 10 additions & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ description = """
all-features = true

[features]
# Features configuration.
#
# Note that, due to the way build.rs scripts work, change of features does not trigger
# regeneration of protobuf files. This means you need to be extra careful when changing
# features, as you might end up with outdated and/or conflicting generated files.
#
# Sometimes cleaning the build cache with `cargo clean` might be necessary to solve
# issues related to outdated generated files.
default = ["grpc"]

# Enable standard library support
Expand All @@ -25,14 +33,15 @@ grpc = [
"std",
"tenderdash-proto-compiler/server",
"tenderdash-proto-compiler/client",
"dep:tonic",
]

[dependencies]
prost = { version = "0.12", default-features = false, features = [
"prost-derive",
] }
prost-types = { version = "0.12", default-features = false }
tonic = { version = "0.11" }
tonic = { version = "0.11", optional = true }
bytes = { version = "1.0", default-features = false, features = ["serde"] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
subtle-encoding = { version = "0.5", default-features = false, features = [
Expand Down
3 changes: 0 additions & 3 deletions proto/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,4 @@ fn main() {
println!("cargo:rerun-if-changed=Cargo.toml");
println!("cargo:rerun-if-env-changed=CARGO_PKG_VERSION");
println!("cargo:rerun-if-env-changed=TENDERDASH_COMMITISH");
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_STD");
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_GRPC_SERVER");
println!("cargo:rerun-if-env-changed=CARGO_FEATURE_GRPC_CLIENT");
}

0 comments on commit 1e9689d

Please sign in to comment.