1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Fuzz-only entry points — compiled only with `--features fuzzing` and driven
//! by the cargo-fuzz targets in `fuzz/`. Each wrapper feeds a raw byte slice
//! into one of Rivet's untrusted-input parsers; the fuzz contract is simply
//! **must not panic** (a garbled input must yield a clean `Err`/`None`, never an
//! `unwrap`/slice/overflow panic). This module is never compiled into the
//! published crate — the feature is off by default and enabled by no other.
//!
//! Scope note: Rivet's genuinely untrusted *text/binary parse* surface is
//! narrow. MySQL and SQL Server CDC decode the **binary** wire protocol inside
//! their driver crates (not Rivet code); the Parquet path only *writes* from
//! already-typed Arrow (it never parses untrusted Parquet). The three parsers
//! below are the real Rivet-owned surface.
/// Config YAML parser. The operator-authored config is only semi-trusted, but a
/// hostile or garbled file must produce a clean error — never a panic.
/// PostgreSQL `test_decoding` text decoder — parses adversarial-ish text off the
/// logical-replication wire (column lists, typed values, arrays, intervals,
/// timestamps). The richest Rivet-side parse surface and historically the most
/// bug-prone (timezone / datestyle / bytea rendering); see the CDC text-decode
/// rules in the project guidelines.
/// MongoDB resume-token decoder — hex → BSON `Document::from_reader`, a real
/// untrusted binary-parse path reached from a JSON checkpoint field.