1#![warn(rustc::all)]
46#![warn(clippy::pedantic)]
47#![deny(unsafe_code)]
48#![deny(unsafe_op_in_unsafe_fn)]
49#![deny(nonstandard_style)]
50#![deny(missing_debug_implementations)]
51#![deny(clippy::missing_errors_doc)]
52#![deny(clippy::missing_panics_doc)]
53#![deny(rustdoc::broken_intra_doc_links)]
54#![cfg_attr(test, allow(clippy::large_stack_arrays))]
55#![allow(
56 clippy::inline_always,
57 reason = "hot-path functions use #[inline(always)] intentionally for constant-folding"
58)]
59#![allow(
60 clippy::manual_let_else,
61 reason = "match can be clearer than let-else for some patterns"
62)]
63#![allow(
64 clippy::redundant_closure_for_method_calls,
65 reason = "causes clippy ICE on Rust 1.94; matches the workaround in workspace Cargo.toml"
66)]
67#![allow(
68 clippy::float_cmp,
69 reason = "numeric domain crate: float equality comparisons are pervasive and intentional"
70)]
71#![allow(
72 clippy::unsafe_derive_deserialize,
73 reason = "serde derives on types with unsafe methods for FFI are intentional"
74)]
75#![allow(
76 clippy::cast_possible_truncation,
77 clippy::cast_possible_wrap,
78 clippy::cast_sign_loss,
79 clippy::cast_precision_loss,
80 reason = "numeric domain crate: casts are fundamental to fixed-point arithmetic and type conversions"
81)]
82#![allow(
83 clippy::trivially_copy_pass_by_ref,
84 reason = "changing pass-by-ref to pass-by-value would break FFI and Python binding signatures"
85)]
86#![allow(
87 clippy::similar_names,
88 reason = "domain terminology creates naturally similar names (bid/ask, base/quote)"
89)]
90#![allow(
91 clippy::too_many_lines,
92 reason = "trading domain functions with match arms over many variants are complex by nature"
93)]
94#![allow(
95 clippy::match_same_arms,
96 reason = "identical match arms are sometimes intentional for documentation and readability"
97)]
98#![allow(
99 clippy::unused_self,
100 reason = "PyO3 methods require &self for Python binding even when Rust impl does not use it"
101)]
102#![allow(
103 clippy::many_single_char_names,
104 reason = "math formulas (Black-Scholes, Greeks) use standard single-character variable names"
105)]
106#![allow(
107 clippy::large_types_passed_by_value,
108 reason = "PyO3 methods require owned values extracted from Python objects"
109)]
110
111pub mod accounts;
112pub mod currencies;
113pub mod data;
114pub mod enums;
115pub mod events;
116pub mod identifiers;
117pub mod instruments;
118pub mod macros;
119pub mod orderbook;
120pub mod orders;
121pub mod position;
122pub mod reports;
123pub mod types;
124pub mod venues;
125
126pub(crate) mod expressions;
127
128#[cfg(feature = "ffi")]
129pub mod ffi;
130
131#[cfg(feature = "python")]
132pub mod python;
133
134#[cfg(any(test, feature = "stubs"))]
135pub mod stubs;
136
137#[cfg(feature = "defi")]
138pub mod defi;