Skip to main content

hyprstream_core/
lib.rs

1//! Adaptive ML inference server.
2//!
3//! This crate provides the core functionality for:
4//! - Real-time weight updates for neural networks
5//! - Dynamic adaptive ML inference
6//! - Hardware-accelerated storage
7//! - Memory-mapped disk persistence
8//! - FlightSQL interface for embeddings and similarity search
9
10#[cfg(not(feature = "encrypted-account-admission"))]
11compile_error!(
12    "security invariant: every Hyprstream build requires the `encrypted-account-admission` \
13     policy so the production UserStore cannot fall back to plaintext storage"
14);
15
16#[cfg(all(feature = "metrics", feature = "pglite"))]
17compile_error!(
18    "features `metrics` and `pglite` are mutually exclusive: DuckDB and PGlite \
19     export overlapping PostgreSQL C symbols; build the credential/PDS service \
20     with `credential-pds`, and the Metrics/inference/Flight service with `metrics`"
21);
22
23// Re-export capnp modules from hyprstream-rpc (compiled once, shared by all crates)
24pub use hyprstream_rpc::annotations_capnp;
25pub use hyprstream_rpc::common_capnp;
26pub use hyprstream_rpc::nine_capnp;
27pub use hyprstream_rpc::optional_capnp;
28pub use hyprstream_rpc::streaming_capnp;
29
30pub mod account;
31pub mod api;
32pub mod archetypes;
33pub mod auth;
34pub mod cli;
35pub mod config;
36pub mod constants;
37pub mod error;
38pub mod events;
39pub mod git;
40pub mod inference;
41pub mod mac;
42// runtime and training moved to the `hyprstream-inference` crate (Wave B decomposition);
43// re-exported as modules so every existing `crate::runtime` / `crate::training` path
44// keeps resolving.
45pub use hyprstream_inference::runtime;
46pub mod schema;
47pub mod server;
48pub mod services;
49pub mod storage;
50#[cfg(unix)]
51pub mod systemd;
52pub use hyprstream_inference::training;
53pub mod tui;
54
55// Storage exports removed
56pub use runtime::{FinishReason, GenerationResult, RuntimeConfig, RuntimeEngine, TorchEngine};
57
58// Export init function from runtime
59pub use runtime::create_engine as init;
60
61// Event types exports
62pub use events::{EventEnvelope, EventPayload, EventSource};