Skip to main content

protocache_extension/
lib.rs

1//! Schema-aware conversion and reflection support for ProtoCache.
2//!
3//! The crate converts [`prost::Message`] and [`prost_reflect::DynamicMessage`]
4//! values into ProtoCache words, loads and writes protobuf JSON, and exposes a
5//! lightweight descriptor model used by the generator. Direct `.proto` source
6//! parsing is available only with the `native-proto` feature on Unix; the
7//! default build is pure Rust.
8//!
9//! Use [`utils`] for application-facing conversion helpers and [`reflection`]
10//! when building schema-driven tooling.
11
12#[cfg(all(feature = "native-proto", target_family = "unix"))]
13mod proto;
14/// ProtoCache's validated, lightweight schema descriptor model.
15pub mod reflection;
16mod serialize;
17/// Protobuf, dynamic-message, JSON, and optional `.proto` conversion helpers.
18pub mod utils;
19
20pub use protocache_core::MutableError;
21
22#[cfg(all(feature = "native-proto", not(target_family = "unix")))]
23compile_error!("the `native-proto` feature is currently supported only on Unix targets");