cuprate_blockchain/lib.rs
1#![doc = include_str!("../README.md")]
2#![allow(
3 // See `cuprate-database` for reasoning.
4 clippy::significant_drop_tightening
5)]
6
7// Only allow building 64-bit targets.
8//
9// This allows us to assume 64-bit
10// invariants in code, e.g. `usize as u64`.
11//
12// # Safety
13// As of 0d67bfb1bcc431e90c82d577bf36dd1182c807e2 (2024-04-12)
14// there are invariants relying on 64-bit pointer sizes.
15#[cfg(not(target_pointer_width = "64"))]
16compile_error!("Cuprate is only compatible with 64-bit CPUs");
17
18//---------------------------------------------------------------------------------------------------- Public API
19// Import private modules, export public types.
20//
21// Documentation for each module is located in the respective file.
22
23mod constants;
24mod free;
25
26pub use constants::DATABASE_VERSION;
27pub use cuprate_database;
28pub use free::open;
29
30pub mod config;
31pub mod ops;
32pub mod service;
33pub mod tables;
34pub mod types;
35
36//---------------------------------------------------------------------------------------------------- Private
37#[cfg(test)]
38pub(crate) mod tests;
39
40pub(crate) mod unsafe_sendable;