1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// SPDX-License-Identifier: MIT OR Apache-2.0
//! # corpus-ipc
//!
//! Inter-Process Communication (IPC) library for bridging Rust to external compute engines.
//!
//! Repository: <https://github.com/Limen-Neural/corpus-ipc>
//!
//! Provides a unified interface for various backends:
//!
//! - [`IpcBackend`] — required backend contract (deprecated alias: `RuntimeBackend`)
//! - [`RustBackend`] — pure-Rust native backend (no external deps, always available)
//! - `ZmqIpcBackend` — IPC backend via ZMQ SUB socket (feature `zmq`;
//! deprecated alias: `ZmqRuntimeBackend`). `Send` + `Sync` via mutex-serialized
//! socket ownership; the raw `zmq::Socket` is never `Sync`.
//!
//! ## Feature flags
//!
//! The default crate is schema and transport only: wire models, [`IpcBackend`],
//! and [`RustBackend`]. Optional stacks are opt-in so library consumers do not
//! compile or link ZeroMQ or the HTTP service:
//!
//! | Feature | Enables |
//! | --- | --- |
//! | *(none / default)* | Wire models and `RustBackend` |
//! | `zmq` | `ZmqIpcBackend` (vendored libzmq; needs a C++ compiler) |
//! | `server` | `corpus_ipc_server` Axum REST binary (`axum` + `tokio`) |
//!
//! Combine `server` and `zmq` when the REST service should select the ZMQ
//! backend via `CORPUS_IPC_BACKEND_TYPE=zmq`.
//!
//! ## Wire compatibility
//!
//! [`WireCompatibility`] is the source of truth for on-wire schema versions
//! (independent of crate semver). Decode hybrid-flow JSON through
//! [`decode_ipc_message_json`] so too-old and too-new envelopes fail closed
//! before the payload is used. See [`compatibility`] for the encoding rules
//! (unknown fields ignored; unknown [`IpcMessage`] variants never default).
/// Re-export the wire-schema compatibility envelope.
pub use ;
/// Re-export the main error type.
pub use BackendError;
/// Re-export all public data models used on the wire.
pub use ;
/// Re-export the core trait, factory, and backend.
pub use RustBackend;
pub use ;
/// Re-export typed wire validation.
pub use ;
pub use ZmqIpcBackend;
pub use ZmqRuntimeBackend;