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