melin_server/lib.rs
1//! Trading-specific server wiring.
2//!
3//! Holds the trading adapter for the generic
4//! `melin-server-runtime` pipeline:
5//!
6//! - [`exchange_app::ServerApp`] — the `Application`-impl newtype
7//! wrapping `melin_exchange_core::exchange::Exchange` (orphan-rule
8//! workaround: the trait lives in `melin-app`, the engine in
9//! `melin-exchange-core`, so the impl can only attach here).
10//! - [`app_factory::Factory`] — `AppFactory` impl that
11//! builds empty / seed-ready exchanges and yields the bulk-seed
12//! events the runtime journals on first start.
13//! - [`request_decoder::RequestDecoder`] — wire-`Request` →
14//! `TradingEvent` decoder.
15//! - [`response_encoder::ResponseEncoder`] —
16//! `ExecutionReport` / `QueryResponse` → wire encoder.
17//! - [`event_publisher`] — market-data firehose.
18
19pub mod app_factory;
20pub mod exchange_app;
21pub mod request_decoder;
22pub mod response_encoder;
23
24pub mod event_publisher;
25
26// Crate-root re-exports for the three trading adapters most often
27// referenced from outside this crate — the `melin-server` binary, the
28// `melin-server-runtime` doc comments, and bench code all reach them by
29// short path. Keeps doc-links like `melin_server::Factory`
30// resolving without requiring callers to know the internal module layout.
31pub use app_factory::Factory;
32pub use exchange_app::ServerApp;
33pub use request_decoder::RequestDecoder;
34pub use response_encoder::ResponseEncoder;