#protobuf #descriptor-set #serialization #proto #proto-file #buffer #protocols

build protobuf-parse

Parse .proto files. Files are parsed into a protobuf::descriptor::FileDescriptorSet object using either: pure rust parser (no dependencies) protoc binary (more reliable and compatible with Google’s implementation)

26 releases (13 stable)

new 3.7.2 Mar 10, 2025
3.7.1 Oct 15, 2024
3.6.0 Sep 30, 2024
3.5.0 Jun 26, 2024
3.0.0-alpha.2 Nov 1, 2021

#355 in Encoding

Download history 99101/week @ 2024-11-19 70893/week @ 2024-11-26 102422/week @ 2024-12-03 106397/week @ 2024-12-10 75294/week @ 2024-12-17 39404/week @ 2024-12-24 45055/week @ 2024-12-31 89154/week @ 2025-01-07 83908/week @ 2025-01-14 79090/week @ 2025-01-21 84597/week @ 2025-01-28 114482/week @ 2025-02-04 113005/week @ 2025-02-11 121699/week @ 2025-02-18 127932/week @ 2025-02-25 105262/week @ 2025-03-04

488,240 downloads per month
Used in 190 crates (19 directly)

MIT license

1.5MB
38K SLoC

C 26K SLoC // 0.1% comments Rust 12K SLoC // 0.1% comments Bitbake 793 SLoC // 0.2% comments Bazel 57 SLoC // 0.1% comments

Parse .proto files

Parse .proto file definitions, not the protobuf text format serialization.

Files can be parsed using pure Rust parser (mod pure) or using the protoc command (mod protoc).

This crate is not meant to be used directly, but rather through the protobuf-codegen crate. If you think this crate might be useful to you, please consider creating an issue, until that this crate is considered to have no stable API.


lib.rs:

Parse .proto files

Parse .proto file definitions, not the protobuf text format serialization.

Files can be parsed using pure Rust parser (mod pure) or using the protoc command (mod protoc).

This crate is not meant to be used directly, but rather through the protobuf-codegen crate. If you think this crate might be useful to you, please consider creating an issue, until that this crate is considered to have no stable API.

Dependencies

~3–12MB
~164K SLoC