[package]
name = "cdc"
version = "0.0.1"
edition = "2018"
publish = false

[features]
protobuf-codec = [
  "engine_rocks/protobuf-codec",
  "grpcio/protobuf-codec",
  "kvproto/protobuf-codec",
  "pd_client/protobuf-codec",
  "raft/protobuf-codec",
  "raftstore/protobuf-codec",
  "tikv/protobuf-codec",
  "txn_types/protobuf-codec",
]
prost-codec = [
  "engine_rocks/prost-codec",
  "grpcio/prost-codec",
  "kvproto/prost-codec",
  "pd_client/prost-codec",
  "raft/prost-codec",
  "raftstore/prost-codec",
  "tikv/prost-codec",
  "txn_types/prost-codec",
]
tcmalloc = ["tikv/tcmalloc"]
jemalloc = ["tikv/jemalloc"]
mimalloc = ["tikv/mimalloc"]
portable = ["tikv/portable"]
sse = ["tikv/sse"]
mem-profiling = ["tikv/mem-profiling"]
failpoints = ["tikv/failpoints"]

[dependencies]
crossbeam = "0.8"
bitflags = "1.0"
engine_rocks = { path = "../engine_rocks" }
engine_traits = { path = "../engine_traits" }
failure = "0.1"
futures = "0.1"
futures03 = { package = "futures", version = "0.3.1", features = ["compat"] }
grpcio = { version = "0.5", default-features = false, features = ["openssl-vendored"] }
kvproto = { git = "https://github.com/pingcap/kvproto.git", branch = "release-4.0", default-features = false }
pd_client = { path = "../pd_client" }
raft = { version = "0.6.0-alpha", default-features = false }
raftstore = { path = "../raftstore" }
resolved_ts = { path = "../resolved_ts" }
security = { path = "../security" }
semver = "0.9"
configuration = { path = "../configuration" }
slog = { version = "2.3", features = ["max_level_trace", "release_max_level_debug"] }
slog-global = { version = "0.1", git = "https://github.com/breeswish/slog-global.git", rev = "0e23a5baff302a9d7bccd85f8f31e43339c2f2c1" }
tikv = { path = "../../", default-features = false }
tikv_util = { path = "../tikv_util" }
tokio = { version = "0.2", features = ["rt-threaded"]}
txn_types = { path = "../txn_types" }
fail = "0.4"
lazy_static = "1.3"
prometheus = { version = "0.8", default-features = false, features = ["nightly", "push"] }
log_wrappers = { path = "../log_wrappers" }
protobuf = "2.8"
prost = "0.6"
futures-timer = "3.0"
matches = "0.1"

[dev-dependencies]
engine = { path = "../engine" }
engine_traits = { path = "../engine_traits" }
tempfile = "3.0"
test_raftstore = { path = "../test_raftstore" }
test_util = { path = "../test_util" }
panic_hook = { path = "../panic_hook" }
time = "0.1"
criterion = "0.3"

[[test]]
name = "integrations"
path = "tests/integrations/mod.rs"

# To avoid failpoints interfere with normal tests, we separate them.
[[test]]
name = "failpoints"
path = "tests/failpoints/mod.rs"
required-features = ["failpoints"]

[[bench]]
name = "cdc_event"
harness = false
required-features = ["protobuf-codec"]
