Expand description
oxiproto-build — Pure Rust .proto → Rust codegen, no protoc required.
Downstream crates add this as a [build-dependencies] entry and call
compile_protos (or Builder) from their build.rs.
§Quick start
fn main() -> Result<(), Box<dyn std::error::Error>> {
oxiproto_build::compile_protos(&["proto/service.proto"], &["proto/"])?;
Ok(())
}Re-exports§
pub use builder::Builder;pub use compile_str::compile_str as compile_str_fn;pub use error::BuildError;pub use compile_str::compile_str;
Modules§
- builder
Builder— configurable.proto→ Rust codegen pipeline.- compile_
str - Compile an inline proto definition string to a
prost_types::FileDescriptorSet. - error
- Structured error type for
oxiproto-buildoperations. - parser
- Native
.protoparser (Slice P fills this in). Native.protofile lexer, outline parser, and full body parser.
Functions§
- compile_
files_ native - Compile a set of
.protofiles to aprost_types::FileDescriptorSetusing the native parser. - compile_
protos - Compile
.protofiles to Rust without requiringprotoconPATH. - compile_
str_ native - Compile a proto3 source string to a
prost_types::FileDescriptorSetusing the native pure-Rust parser (noprotoxdependency). - compile_
to_ fds - Parse
.protofiles to aprost_types::FileDescriptorSetwithout invokingprotocor writing any files.