nautilus_persistence/lib.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2026 Nautech Systems Pty Ltd. All rights reserved.
3// https://nautechsystems.io
4//
5// Licensed under the GNU Lesser General Public License Version 3.0 (the "License");
6// You may not use this file except in compliance with the License.
7// You may obtain a copy of the License at https://www.gnu.org/licenses/lgpl-3.0.en.html
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14// -------------------------------------------------------------------------------------------------
15
16//! Data persistence and storage management for [NautilusTrader](https://nautilustrader.io).
17//!
18//! The `nautilus-persistence` crate provides data persistence capabilities for storing and retrieving
19//! trading data, state, and configuration.
20//!
21//! # NautilusTrader
22//!
23//! [NautilusTrader](https://nautilustrader.io) is an open-source, production-grade, Rust-native
24//! engine for multi-asset, multi-venue trading systems.
25//!
26//! The system spans research, deterministic simulation, and live execution within a single
27//! event-driven architecture, providing research-to-live semantic parity.
28//!
29//! # Feature Flags
30//!
31//! This crate provides feature flags to control source code inclusion during compilation,
32//! depending on the intended use case, i.e. whether to provide Python bindings
33//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
34//! or as part of a Rust only build.
35//!
36//! - `cloud`: Enables cloud storage backends (S3, Azure, GCP, HTTP) via `object_store`.
37//! - `defi`: Enables DeFi (Decentralized Finance) support.
38//! - `extension-module`: Builds as a Python extension module.
39//! - `high-precision`: Enables
40//! [high-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation/#precision-mode)
41//! to use 128-bit value types.
42//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs) and auto-enables `cloud`.
43
44#![warn(rustc::all)]
45#![warn(clippy::pedantic)]
46#![allow(
47 clippy::manual_let_else,
48 clippy::option_if_let_else,
49 clippy::or_fun_call,
50 clippy::redundant_else,
51 clippy::similar_names,
52 clippy::single_match_else,
53 reason = "workspace policy; generated by scripts/update-clippy-allowances.py"
54)]
55#![deny(nonstandard_style)]
56#![deny(unsafe_op_in_unsafe_fn)]
57#![deny(rustdoc::broken_intra_doc_links)]
58// #![deny(clippy::missing_errors_doc)]
59#![allow(
60 clippy::assert_is_empty,
61 reason = "`assert!(x.is_empty())` is clearer than comparing against an empty value"
62)]
63// pyo3's `from_py_object` generates `.clone()` on `Copy` fields that clippy flags from the
64// macro expansion; an item-level `allow` cannot reach the expansion
65#![allow(clippy::clone_on_copy)]
66
67pub mod backend;
68pub mod catalog;
69pub mod common;
70pub mod config;
71pub mod errors;
72pub mod test_data;
73pub mod writer;
74
75#[cfg(feature = "python")]
76pub mod python;