buffa_descriptor/lib.rs
1//! Protobuf descriptor types for buffa.
2//!
3//! This crate provides buffa-generated Rust types for the protobuf descriptor
4//! schema (`google/protobuf/descriptor.proto`) and the protoc plugin protocol
5//! (`google/protobuf/compiler/plugin.proto`). It is the foundation for both
6//! compile-time code generation (`buffa-codegen`) and runtime reflection.
7//!
8//! The types are self-hosted — generated by buffa-codegen itself — so there
9//! is no dependency on an external protobuf library. The only runtime
10//! dependency is `buffa`.
11//!
12//! # Modules
13//!
14//! - [`generated::descriptor`] — `FileDescriptorProto`, `DescriptorProto`,
15//! `FieldDescriptorProto`, `FeatureSet`, `Edition`, and the rest of
16//! `descriptor.proto`.
17//! - [`generated::compiler`] — `CodeGeneratorRequest`, `CodeGeneratorResponse`
18//! from `plugin.proto`.
19//!
20//! # Regenerating
21//!
22//! The generated code is checked in. To regenerate (after a codegen output
23//! change or a protobuf version bump):
24//!
25//! ```sh
26//! task gen-bootstrap-types
27//! ```
28
29#![cfg_attr(not(feature = "std"), no_std)]
30
31extern crate alloc;
32
33pub mod generated;