Expand description
oxiproto-codegen — Generate plain Rust source code from a FileDescriptorSet.
This crate walks a prost_types::FileDescriptorSet and emits plain Rust
structs and enums — no prost derive, no gRPC stubs, no validators.
§Quick start
use prost_types::FileDescriptorSet;
let fds: FileDescriptorSet = /* parse your .proto */ Default::default();
let rust_src = oxiproto_codegen::generate(&fds).expect("codegen failed");
println!("{rust_src}");Modules§
- wkt_map
- Mapping from proto well-known type FQNs to Rust type paths.
Structs§
- Codegen
Options - Options controlling code generation from a
FileDescriptorSet. - Module
Tree - Structured representation of generated Rust code grouped into a module hierarchy.
Enums§
- Codegen
Error - Errors produced during code generation.
Functions§
- emit_
file_ descriptor_ set - Emit Rust source code from a
FileDescriptorSet. - emit_
file_ descriptor_ set_ with_ options - Emit Rust source code from a
FileDescriptorSetwith custom options. - generate
- Generate Rust source code from a
FileDescriptorSet. - generate_
module - Generate a structured module tree from a
FileDescriptorSet. - generate_
to_ file - Write generated code to a file path.
- generate_
to_ file_ with_ options - Write generated code to a file path with custom options.
- generate_
with_ options - Generate Rust source code with custom codegen options.