nautilus_system/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//! System-level components and orchestration for [NautilusTrader](http://nautilustrader.io).
17//!
18//! The `nautilus-system` crate provides the core system architecture for orchestrating trading systems,
19//! including the kernel that manages all engines, configuration management,
20//! and system-level factories for creating components:
21//!
22//! - `NautilusKernel` - Core system orchestrator managing engines and components.
23//! - `NautilusKernelConfig` - Configuration for kernel initialization.
24//! - System builders and factories for component creation.
25//!
26//! # Platform
27//!
28//! [NautilusTrader](http://nautilustrader.io) is an open-source, high-performance, production-grade
29//! algorithmic trading platform, providing quantitative traders with the ability to backtest
30//! portfolios of automated trading strategies on historical data with an event-driven engine,
31//! and also deploy those same strategies live, with no code changes.
32//!
33//! NautilusTrader's design, architecture, and implementation philosophy prioritizes software correctness and safety at the
34//! highest level, with the aim of supporting mission-critical, trading system backtesting and live deployment workloads.
35//!
36//! # Feature flags
37//!
38//! This crate provides feature flags to control source code inclusion during compilation,
39//! depending on the intended use case, i.e. whether to provide Python bindings
40//! for the [nautilus_trader](https://pypi.org/project/nautilus_trader) Python package,
41//! or as part of a Rust only build.
42//!
43//! - `streaming`: Enables `persistence` dependency for streaming configuration.
44//! - `python`: Enables Python bindings from [PyO3](https://pyo3.rs) (auto-enables `streaming`).
45//! - `extension-module`: Builds the crate as a Python extension module.
46
47#![warn(rustc::all)]
48#![deny(unsafe_code)]
49#![deny(unsafe_op_in_unsafe_fn)]
50#![deny(nonstandard_style)]
51#![deny(missing_debug_implementations)]
52#![deny(clippy::missing_errors_doc)]
53#![deny(clippy::missing_panics_doc)]
54#![deny(rustdoc::broken_intra_doc_links)]
55
56pub mod builder;
57pub mod config;
58pub mod factories;
59pub mod kernel;
60pub mod trader;
61
62#[cfg(feature = "python")]
63pub mod python;
64
65// Re-exports
66pub use builder::NautilusKernelBuilder;
67pub use config::NautilusKernelConfig;
68pub use factories::{ClientConfig, DataClientFactory, ExecutionClientFactory};
69pub use kernel::NautilusKernel;
70#[cfg(feature = "python")]
71pub use python::{FactoryRegistry, get_global_pyo3_registry};