vectorizer_protocol/lib.rs
1//! Wire protocol types for Vectorizer — shared between the server
2//! (umbrella `vectorizer` crate, soon `vectorizer-server`) and the
3//! Rust SDK (`sdks/rust`). Carries the on-the-wire shapes only; the
4//! dispatch / handler layer lives in `vectorizer::protocol::rpc::server`
5//! and `vectorizer::grpc::server` because those types depend on the
6//! storage engine, auth, and the capability registry.
7//!
8//! - [`rpc_wire`] — length-prefixed MessagePack frames (Request /
9//! Response / VectorizerValue) and the codec helpers that read /
10//! write them. Wire spec: `docs/specs/VECTORIZER_RPC.md`.
11//! - [`grpc_gen`] — `tonic-prost`-generated modules for the three
12//! gRPC schemas: `vectorizer`, `cluster`, `qdrant_proto`. Built by
13//! this crate's `build.rs` against the `proto/` source tree.
14
15#![deny(missing_docs)]
16
17pub mod rpc_wire;
18
19/// `tonic-prost`-generated gRPC modules. Mirrors the layout of the
20/// underlying `proto/` source tree.
21///
22/// Generated code can't carry per-item lint annotations, so the
23/// wrapping module silences the workspace lints that the proto
24/// generator routinely trips (large enum variants from one-of
25/// fields, `#[non_exhaustive]` boilerplate, missing docs).
26#[allow(
27 missing_docs,
28 clippy::large_enum_variant,
29 clippy::doc_markdown,
30 clippy::module_inception
31)]
32pub mod grpc_gen {
33 /// First-party Vectorizer gRPC schema (`proto/vectorizer.proto`).
34 pub mod vectorizer {
35 include!("grpc_gen/vectorizer.rs");
36 }
37
38 /// Cluster RPC schema (`proto/cluster.proto`).
39 pub mod cluster {
40 include!("grpc_gen/vectorizer.cluster.rs");
41 }
42
43 /// Qdrant compatibility schema (`proto/qdrant/*.proto`).
44 pub mod qdrant_proto {
45 include!("grpc_gen/qdrant/qdrant.rs");
46 }
47}