# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "pg_replica"
version = "0.4.0"
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Consensus-driven failover for PostgreSQL (Raft control plane)"
readme = "README.md"
keywords = [
    "postgresql",
    "raft",
    "failover",
    "replication",
    "pgrx",
]
categories = ["database"]
license = "GPL-3.0-or-later"
repository = "https://github.com/hyperiondb"

[features]
default = ["pg18"]
pg18 = [
    "pgrx/pg18",
    "pgrx-tests/pg18",
]
pg_test = []

[lib]
name = "pg_replica"
crate-type = [
    "cdylib",
    "lib",
]
path = "src/lib.rs"

[dependencies.libc]
version = "=0.2.186"

[dependencies.openraft]
version = "=0.9.23"
features = [
    "serde",
    "storage-v2",
]

[dependencies.pgrx]
version = "=0.18.1"

[dependencies.serde]
version = "=1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "=1.0.150"

[dependencies.tokio]
version = "=1.52.3"
features = [
    "rt-multi-thread",
    "net",
    "io-util",
    "sync",
    "time",
    "macros",
]

[dev-dependencies.pgrx-tests]
version = "=0.18.1"

[profile.dev]
panic = "unwind"

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "unwind"
