pjson_rs/
lib.rs

1//! # PJS Core
2//!
3//! Core types and protocols for the Priority JSON Streaming Protocol.
4//! This crate provides high-performance JSON parsing with SIMD optimizations,
5//! zero-copy operations, and semantic type hints for automatic optimization.
6
7#![warn(rust_2018_idioms)]
8#![deny(unsafe_op_in_unsafe_fn)]
9// Temporarily allow missing docs while in development
10#![allow(missing_docs)]
11// Allow some non-critical clippy warnings for development
12#![allow(clippy::clone_on_copy)]
13#![allow(clippy::derivable_impls)]
14#![allow(clippy::unwrap_or_default)]
15#![allow(clippy::manual_div_ceil)]
16#![allow(clippy::needless_range_loop)]
17#![allow(clippy::explicit_auto_deref)]
18#![allow(clippy::unnecessary_map_or)]
19#![allow(clippy::while_let_on_iterator)]
20#![allow(clippy::let_and_return)]
21#![allow(clippy::redundant_closure)]
22#![allow(clippy::new_without_default)]
23#![allow(clippy::map_clone)]
24#![allow(clippy::only_used_in_recursion)]
25// Allow dead code for fields and methods that will be used in the future
26#![allow(dead_code)]
27
28pub mod application;
29pub mod compression;
30pub mod domain;
31pub mod error;
32pub mod frame;
33pub mod infrastructure;
34pub mod parser;
35pub mod semantic;
36pub mod stream;
37
38// Domain layer exports
39pub use domain::{
40    DomainError, DomainEvent, DomainResult, Frame as DomainFrame, JsonPath, Priority, SessionId,
41    Stream, StreamId, StreamSession,
42};
43
44// Application layer exports
45pub use application::{
46    ApplicationError, ApplicationResult, commands,
47    handlers::{CommandHandler, QueryHandler},
48    queries,
49    services::{SessionService, StreamingService},
50};
51
52// Compression exports
53pub use compression::{
54    CompressedData, CompressionStrategy, SchemaAnalyzer, SchemaCompressor,
55};
56
57// Streaming exports
58pub use stream::{
59    CompressedFrame, CompressionStats, DecompressionMetadata, DecompressionStats,
60    ProcessResult, StreamConfig, StreamFrame, StreamProcessor, StreamStats,
61    StreamingCompressor, StreamingDecompressor, PriorityStreamer,
62};
63pub use error::{Error, Result};
64pub use frame::{Frame, FrameFlags, FrameHeader};
65pub use parser::{ParseConfig, ParseStats, Parser};
66pub use semantic::{SemanticMeta, SemanticType};
67// Legacy stream exports (will be deprecated)
68// pub use stream::{
69//     JsonPath as StreamJsonPath, JsonReconstructor, Priority as StreamPriority, PriorityStreamer,
70//     ProcessResult, StreamFrame, StreamProcessor, StreamerConfig,
71// };
72
73/// Re-export commonly used types
74pub mod prelude {
75    pub use super::{
76        ApplicationError,
77        // Application layer
78        ApplicationResult,
79        CommandHandler,
80        DomainError,
81        DomainEvent,
82        DomainFrame,
83        // Domain layer
84        DomainResult,
85        // Core types
86        Error,
87        Frame,
88        FrameFlags,
89        FrameHeader,
90        JsonPath,
91        // TODO: Re-add when legacy modules are reconciled
92        // JsonReconstructor,
93        Priority,
94        // PriorityStreamer,
95        ProcessResult,
96        QueryHandler,
97        Result,
98        SemanticMeta,
99        SemanticType,
100        SessionId,
101        SessionService,
102        Stream,
103        StreamId,
104        StreamProcessor,
105        StreamSession,
106        StreamingService,
107    };
108}