Skip to main content

sources_postgres/
lib.rs

1// Integration/e2e tests (in `tests/`) pull dev-dependencies the unit-test build
2// doesn't touch; allow that only under `cfg(test)` — the normal build still
3// enforces unused dependencies.
4#![cfg_attr(test, allow(unused_crate_dependencies))]
5
6mod cdc;
7mod document;
8
9pub use cdc::WalChangeCapture;
10pub use document::PgDocumentBuilder;
11
12// Re-exported so callers can build a capture without depending on
13// `pgwire-replication` directly.
14pub use pgwire_replication::{Lsn, ReplicationConfig, SslMode, TlsConfig};
15
16/// Fuzzing entry point for the pgoutput decoder — feeds arbitrary bytes through
17/// it and asserts (by not panicking) that malformed input is rejected rather
18/// than crashing. Used by the `fuzz/` cargo-fuzz crate; gated behind the
19/// `fuzzing` feature and not part of the stable API.
20#[cfg(feature = "fuzzing")]
21pub fn fuzz_pgoutput_decode(data: &[u8]) {
22    cdc::fuzz_decode(data);
23}