mz_storage/lib.rs
1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Use of this software is governed by the Business Source License
4// included in the LICENSE file.
5//
6// As of the Change Date specified in that file, in accordance with
7// the Business Source License, use of this software will be governed
8// by the Apache License, Version 2.0.
9
10//! Materialize's storage layer.
11
12// The `fuzzing` feature re-exports internal upsert types (see `fuzz_exports`)
13// that are intentionally undocumented. Don't require docs for them in that
14// build. The normal public API is still linted.
15#![cfg_attr(not(feature = "fuzzing"), warn(missing_docs))]
16
17pub mod decode;
18pub mod internal_control;
19pub mod metrics;
20pub mod render;
21pub mod server;
22pub mod sink;
23pub mod source;
24pub mod statistics;
25pub mod storage_state;
26pub(crate) mod upsert;
27mod upsert_continual_feedback;
28mod upsert_continual_feedback_v2;
29
30/// Internal upsert types re-exported under `cfg(feature = "fuzzing")` so the
31/// storage fuzz crate can drive the upsert state machine and value encodings
32/// directly. The modules themselves stay crate-private; this facade exposes
33/// only the items the fuzz targets need (mirroring `mz-persist-client` and
34/// `mz-pgwire`). Not part of the public API.
35#[cfg(feature = "fuzzing")]
36pub mod fuzz_exports {
37 pub use crate::upsert::types::{
38 FuzzUpsertParts, StateValue, UpsertValueAndSize, upsert_bincode_opts,
39 };
40 pub use crate::upsert::{UpsertKey, UpsertValue, fuzz_drain_staged_input};
41 pub use crate::upsert_continual_feedback_v2::{datum_seq_to_upsert_value, upsert_value_to_row};
42}
43
44pub(crate) mod healthcheck;
45
46pub use server::serve;