mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-12-23 12:09:52 +00:00
eead49beb0
* cargo.toml: transfer existing lints * rpc/interface: lints * rpc/json-rpc: lints * rpc/types: lints * storage/blockchain: lints * rpc/types: fix lints * cargo.toml: fix lint group priority * storage/blockchain: fix lints * fix misc lints * storage/database: fixes * storage/txpool: opt in lints + fixes * types: opt in + fixes * helper: opt in + fixes * types: remove borsh * rpc/interface: fix test * test fixes * database: fix lints * fix lint * tabs -> spaces * blockchain: `config/` -> `config.rs`
44 lines
1.3 KiB
Rust
44 lines
1.3 KiB
Rust
#![doc = include_str!("../README.md")]
|
|
#![allow(
|
|
// See `cuprate-database` for reasoning.
|
|
clippy::significant_drop_tightening
|
|
)]
|
|
|
|
// Only allow building 64-bit targets.
|
|
//
|
|
// This allows us to assume 64-bit
|
|
// invariants in code, e.g. `usize as u64`.
|
|
//
|
|
// # Safety
|
|
// As of 0d67bfb1bcc431e90c82d577bf36dd1182c807e2 (2024-04-12)
|
|
// there are invariants relying on 64-bit pointer sizes.
|
|
#[cfg(not(target_pointer_width = "64"))]
|
|
compile_error!("Cuprate is only compatible with 64-bit CPUs");
|
|
|
|
//---------------------------------------------------------------------------------------------------- Public API
|
|
// Import private modules, export public types.
|
|
//
|
|
// Documentation for each module is located in the respective file.
|
|
|
|
mod constants;
|
|
mod free;
|
|
|
|
pub use constants::DATABASE_VERSION;
|
|
pub use cuprate_database;
|
|
pub use free::open;
|
|
|
|
pub mod config;
|
|
pub mod ops;
|
|
pub mod tables;
|
|
pub mod types;
|
|
|
|
//---------------------------------------------------------------------------------------------------- Feature-gated
|
|
#[cfg(feature = "service")]
|
|
pub mod service;
|
|
|
|
//---------------------------------------------------------------------------------------------------- Private
|
|
#[cfg(test)]
|
|
pub(crate) mod tests;
|
|
|
|
#[cfg(feature = "service")] // only needed in `service` for now
|
|
pub(crate) mod unsafe_sendable;
|