nautilus_serialization/lib.rs
1// -------------------------------------------------------------------------------------------------
2// Copyright (C) 2015-2025 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 serialization and format conversion for [NautilusTrader](http://nautilustrader.io).
17//!
18//! The `nautilus-serialization` crate provides comprehensive data serialization capabilities for converting
19//! trading data between different formats including Apache Arrow, Parquet, and custom schemas.
20//! This enables efficient data storage, retrieval, and interoperability across different systems:
21//!
22//! - **Apache Arrow integration**: Schema definitions and encoding/decoding for market data types.
23//! - **Parquet file operations**: High-performance columnar storage for historical data analysis.
24//! - **Record batch processing**: Efficient batch operations for time-series data.
25//! - **Schema management**: Type-safe schema definitions with metadata preservation.
26//! - **Cross-format conversion**: Seamless data interchange between Arrow, Parquet, and native types.
27//!
28//! # Platform
29//!
30//! [NautilusTrader](http://nautilustrader.io) is an open-source, high-performance, production-grade
31//! algorithmic trading platform, providing quantitative traders with the ability to backtest
32//! portfolios of automated trading strategies on historical data with an event-driven engine,
33//! and also deploy those same strategies live, with no code changes.
34//!
35//! NautilusTrader's design, architecture, and implementation philosophy prioritizes software correctness and safety at the
36//! highest level, with the aim of supporting mission-critical, trading system backtesting and live deployment workloads.
37//!
38//! # Feature flags
39//!
40//! This crate provides feature flags to control source code inclusion during compilation,
41//! depending on the intended use case, i.e. whether to provide Python bindings
42//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
43//! or as part of a Rust only build.
44//!
45//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs).
46//! - `high-precision`: Enables [high-precision mode](https://nautilustrader.io/docs/nightly/getting_started/installation#precision-mode) to use 128-bit value types.
47//! - `extension-module`: Builds the crate as a Python extension module.
48
49#![warn(rustc::all)]
50#![deny(unsafe_code)]
51#![deny(nonstandard_style)]
52#![deny(missing_debug_implementations)]
53#![deny(clippy::missing_errors_doc)]
54#![deny(clippy::missing_panics_doc)]
55#![deny(rustdoc::broken_intra_doc_links)]
56
57pub mod arrow;
58
59#[cfg(feature = "python")]
60pub mod python;