buffa_descriptor/generated/mod.rs
1//! Generated protobuf descriptor types.
2//!
3//! These types are generated from `google/protobuf/descriptor.proto` and
4//! `google/protobuf/compiler/plugin.proto` using buffa-codegen itself.
5//! This makes buffa fully self-hosted — no external protobuf library is
6//! needed to decode descriptors — and gives direct access to edition
7//! features (`FeatureSet`, `Edition`, etc.).
8//!
9//! To regenerate, run `task gen-bootstrap-types` from the repo root.
10
11#[allow(
12 clippy::all,
13 dead_code,
14 missing_docs,
15 unused_imports,
16 unreachable_patterns,
17 non_camel_case_types
18)]
19pub mod descriptor {
20 // Re-export the buffa crate so `::buffa::` paths in generated code resolve.
21 use buffa;
22 include!("google.protobuf.mod.rs");
23}
24
25// Re-export the specific descriptor types referenced via `super::` from the
26// compiler module (cross-package references in generated code).
27#[allow(unused_imports)]
28pub use descriptor::{FileDescriptorProto, GeneratedCodeInfo};
29
30#[allow(
31 clippy::all,
32 dead_code,
33 missing_docs,
34 unused_imports,
35 unreachable_patterns,
36 non_camel_case_types
37)]
38pub mod compiler {
39 // Re-export GeneratedCodeInfo so `super::GeneratedCodeInfo` resolves from
40 // nested sub-modules (e.g. `code_generator_response::File`).
41 #[allow(unused_imports)]
42 pub use crate::generated::descriptor::GeneratedCodeInfo;
43
44 use buffa;
45 include!("google.protobuf.compiler.mod.rs");
46}