@@ -18,13 +18,13 @@ aptos-indexer-transaction-stream = { workspace = true }
1818aptos-protos = { workspace = true }
1919aptos-transaction-filter = { workspace = true }
2020async-trait = { workspace = true }
21- autometrics = { workspace = true }
22- axum = { workspace = true }
23- backtrace = { workspace = true }
21+ autometrics = { workspace = true , optional = true }
22+ axum = { workspace = true , optional = true }
23+ backtrace = { workspace = true , optional = true }
2424bcs = { workspace = true }
2525bigdecimal = { workspace = true }
2626chrono = { workspace = true }
27- clap = { workspace = true }
27+ clap = { workspace = true , optional = true }
2828derive_builder = { workspace = true }
2929diesel = { workspace = true , optional = true }
3030diesel-async = { workspace = true , optional = true }
@@ -56,28 +56,46 @@ tokio = { workspace = true }
5656tokio-postgres = { workspace = true , optional = true }
5757tokio-retry = { workspace = true , optional = true }
5858tokio-stream = { workspace = true , optional = true }
59- toml = { workspace = true }
59+ toml = { workspace = true , optional = true }
6060tonic = { workspace = true , optional = true }
6161tracing = { workspace = true }
62- tracing-subscriber = { workspace = true }
62+ tracing-subscriber = { workspace = true , optional = true }
6363url = { workspace = true }
6464
6565[target .'cfg(target_os = "linux")' .dependencies ]
6666aptos-system-utils = { workspace = true }
6767
6868[features ]
69+ # Server framework feature enables the HTTP server with metrics and health check endpoints.
70+ # This requires tokio net features for the TCP listener.
71+ server_framework = [
72+ " autometrics" ,
73+ " axum" ,
74+ " backtrace" ,
75+ " clap" ,
76+ " toml" ,
77+ " tracing-subscriber" ,
78+ " tokio/net" ,
79+ ]
6980postgres_partial = [
7081 " diesel" ,
7182 " diesel-async" ,
7283 " diesel_migrations" ,
7384 " field_count" ,
7485 " postgres-native-tls" ,
7586 " native-tls" ,
87+ " server_framework" ,
7688 " tokio-postgres" ,
7789]
7890# When using the postgres_full features we enable the diesel/postgres feature. We configure
7991# it in a feature so the CLI can opt out, since it cannot tolerate the libpq dep.
8092# Recall that features should always be additive.
8193postgres_full = [" postgres_partial" , " diesel/postgres" ]
82- testing_framework = [" testcontainers" , " tonic" , " tokio-retry" , " tokio-stream" ]
94+ testing_framework = [
95+ " testcontainers" ,
96+ " tonic" ,
97+ " tokio-retry" ,
98+ " tokio-stream" ,
99+ " tokio/net" ,
100+ ]
83101default = []
0 commit comments