1#![deny(
20 clippy::expect_used,
21 clippy::indexing_slicing,
22 clippy::panic,
23 clippy::todo,
24 clippy::unimplemented,
25 clippy::unwrap_used,
26 unsafe_op_in_unsafe_fn
27)]
28#![warn(missing_docs)]
29
30#[cfg(feature = "allocation-audit")]
31mod allocation_audit;
32
33#[cfg(any(test, feature = "test-support"))]
34#[doc(hidden)]
35pub mod adversarial_test_support;
36
37pub mod diag;
39pub mod epoch;
41pub mod format;
43pub mod fts;
45pub mod fusion;
47pub mod graph;
49pub mod ingest;
51pub mod kernels;
53pub mod lifecycle;
55pub mod manifest;
57pub mod meta;
59pub mod planner;
61pub mod quant;
63pub mod scan;
65pub mod segment;
67pub mod sys;
69pub mod tier;
71pub mod vfs;
73pub mod wal;
75
76#[cfg(test)]
77mod test_support;
78
79pub const VERSION: &str = env!("CARGO_PKG_VERSION");
81
82#[cfg(test)]
83#[allow(
84 clippy::expect_used,
85 clippy::indexing_slicing,
86 clippy::panic,
87 clippy::unwrap_used
88)]
89mod tests {
90 use rand::RngCore;
91
92 #[test]
93 #[cfg_attr(miri, ignore = "environment-dependent RNG is outside the Miri subset")]
94 fn seeded_rng_is_deterministic_per_name_and_env() {
95 let mut first =
96 crate::test_support::seeded_rng("tests::seeded_rng_is_deterministic_per_name_and_env");
97 let mut second =
98 crate::test_support::seeded_rng("tests::seeded_rng_is_deterministic_per_name_and_env");
99 let mut other_name = crate::test_support::seeded_rng("tests::another_test");
100
101 let first_draw = first.next_u64();
102 let second_draw = second.next_u64();
103 let other_name_draw = other_name.next_u64();
104
105 let environment_seed = std::env::var("ZE_TEST_SEED").unwrap_or_else(|_| String::from("0"));
106 let other_environment_seed = format!("{environment_seed}-different");
107 let mut other_env = crate::test_support::seeded_rng_from(
108 "tests::seeded_rng_is_deterministic_per_name_and_env",
109 &other_environment_seed,
110 );
111 let other_env_draw = other_env.next_u64();
112
113 assert_eq!(first_draw, second_draw);
114 assert_ne!(first_draw, other_name_draw);
115 assert_ne!(first_draw, other_env_draw);
116 }
117
118 #[test]
119 fn version_constant_is_current() {
120 assert_eq!(crate::VERSION, "0.4.0");
121 }
122}