Skip to main content

mz_ore/
lib.rs

1// Copyright Materialize, Inc. and contributors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License in the LICENSE file at the
6// root of this repository, or online at
7//
8//     http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16//! Internal utility libraries for Materialize.
17//!
18//! **ore** (_n_): the raw material from which more valuable materials are extracted.
19//! Modules are included in this crate when they are broadly useful but too
20//! small to warrant their own crate.
21
22#![warn(missing_docs, missing_debug_implementations)]
23#![cfg_attr(nightly_doc_features, feature(doc_cfg))]
24
25#[cfg_attr(nightly_doc_features, doc(cfg(feature = "assert-no-tracing")))]
26#[cfg(feature = "assert-no-tracing")]
27pub mod assert;
28pub mod bits;
29#[cfg_attr(nightly_doc_features, doc(cfg(feature = "bytes")))]
30#[cfg(feature = "bytes")]
31pub mod bytes;
32pub mod cast;
33pub mod cgroup;
34#[cfg_attr(nightly_doc_features, doc(cfg(feature = "async")))]
35#[cfg(feature = "async")]
36pub mod channel;
37#[cfg_attr(nightly_doc_features, doc(cfg(feature = "cli")))]
38#[cfg(feature = "cli")]
39pub mod cli;
40pub mod collections;
41pub mod env;
42pub mod error;
43pub mod fmt;
44#[cfg_attr(nightly_doc_features, doc(cfg(feature = "async")))]
45#[cfg(feature = "async")]
46pub mod future;
47pub mod graph;
48pub mod hash;
49pub mod hint;
50#[cfg(feature = "id_gen")]
51pub mod id_gen;
52pub mod iter;
53pub mod lex;
54pub mod memory;
55#[cfg_attr(nightly_doc_features, doc(cfg(feature = "metrics")))]
56#[cfg(feature = "metrics")]
57pub mod metrics;
58#[cfg_attr(nightly_doc_features, doc(cfg(feature = "network")))]
59#[cfg(feature = "network")]
60pub mod netio;
61pub mod now;
62pub mod num;
63pub mod option;
64#[cfg_attr(nightly_doc_features, doc(cfg(feature = "overflowing")))]
65#[cfg(feature = "overflowing")]
66pub mod overflowing;
67#[cfg(not(target_family = "wasm"))]
68#[cfg(feature = "panic")]
69pub mod panic;
70pub mod path;
71pub mod permutations;
72#[cfg_attr(nightly_doc_features, doc(cfg(all(feature = "pool", unix))))]
73#[cfg(all(feature = "pool", unix))]
74pub mod pool;
75#[cfg(feature = "process")]
76pub mod process;
77#[cfg(feature = "region")]
78pub mod region;
79#[cfg_attr(nightly_doc_features, doc(cfg(feature = "process")))]
80pub mod result;
81#[cfg_attr(nightly_doc_features, doc(cfg(feature = "async")))]
82#[cfg(feature = "async")]
83pub mod retry;
84pub mod secure;
85pub mod serde;
86pub mod sql;
87#[cfg_attr(nightly_doc_features, doc(cfg(feature = "stack")))]
88#[cfg(feature = "stack")]
89pub mod stack;
90pub mod stats;
91pub mod str;
92#[cfg_attr(nightly_doc_features, doc(cfg(feature = "async")))]
93#[cfg(feature = "async")]
94pub mod task;
95#[cfg_attr(nightly_doc_features, doc(cfg(any(test, feature = "test"))))]
96#[cfg(any(test, feature = "test"))]
97pub mod test;
98pub mod thread;
99pub mod time;
100#[cfg_attr(nightly_doc_features, doc(cfg(feature = "tracing")))]
101#[cfg(feature = "tracing")]
102pub mod tracing;
103pub mod treat_as_equal;
104pub mod url;
105pub mod vec;
106
107pub use mz_ore_proc::{instrument, static_list, test};
108
109#[cfg_attr(nightly_doc_features, doc(cfg(feature = "overflowing")))]
110#[cfg(feature = "overflowing")]
111pub use overflowing::Overflowing;
112
113// Links the Antithesis coverage runtime into every binary that links this
114// crate. Only the instrumentation that rustc inserts calls into it.
115#[cfg(all(feature = "antithesis", target_os = "linux"))]
116use antithesis_instrumentation as _;
117
118#[doc(hidden)]
119pub mod __private {
120    #[cfg(feature = "tracing")]
121    pub use tracing;
122}
123
124// Epoch: 1
125//
126// Bump this whenever we need to change the hash of a build without changing any code.