Registry / build-tool / protoc-rust

protoc-rust

JSON →
library2.28.0rscratesunverified

Provides an API to invoke protoc with --rust_out for generating Rust code from protobuf definitions.

# Cargo.toml [dependencies] protoc-rust = "2.28.0"
INSTALL
IMPORT
SIG · PROTOC-RUST
P
protoc-rust
build-toolrustv2.28.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Codegen
use protoc_rust::Codegen;

Generates Rust code from a .proto file using protoc.

use protoc_rust::Codegen; fn main() { Codegen::new() .out_dir("src/protos") .inputs(&["message.proto"]) .include("src") .run() .expect("protoc"); }
Debug
Known issues
gotchaprotoc must be installed and available in $PATH
fix
Install protoc via your package manager or from https://github.com/protocolbuffers/protobuf/releases
affects: >=0.0.0
Upgrade
Version history
2.28.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
protoc-rust — cargo add protoc-rust · libregistry