8 stable releases

new 2.0.0+26.1 May 13, 2024
1.1.0+21.5 Sep 2, 2022
1.0.5+3.19.3 Jan 28, 2022
1.0.1+3.19.1 Dec 23, 2021
0.1.0+3.19.1 Dec 22, 2021

#78 in Encoding

Download history 47085/week @ 2024-01-22 43123/week @ 2024-01-29 39881/week @ 2024-02-05 35427/week @ 2024-02-12 37793/week @ 2024-02-19 40736/week @ 2024-02-26 35714/week @ 2024-03-04 38868/week @ 2024-03-11 39427/week @ 2024-03-18 39688/week @ 2024-03-25 39011/week @ 2024-04-01 37405/week @ 2024-04-08 40992/week @ 2024-04-15 40864/week @ 2024-04-22 36037/week @ 2024-04-29 42281/week @ 2024-05-06

161,868 downloads per month
Used in 116 crates (27 directly)

Apache-2.0

35MB
740K SLoC

C++ 309K SLoC // 0.1% comments C# 123K SLoC // 0.1% comments Java 85K SLoC // 0.2% comments C 60K SLoC // 0.1% comments Objective-C 52K SLoC // 0.1% comments Bazel 28K SLoC // 0.1% comments Python 24K SLoC // 0.3% comments Bitbake 22K SLoC // 0.0% comments PHP 17K SLoC // 0.3% comments Ruby 7K SLoC // 0.1% comments Rust 6K SLoC // 0.1% comments Kotlin 2.5K SLoC // 0.1% comments Shell 2K SLoC // 0.2% comments Lua 1.5K SLoC // 0.1% comments Swift 351 SLoC // 0.1% comments Go 308 SLoC // 0.1% comments Dart 183 SLoC // 0.0% comments Batch 164 SLoC // 0.3% comments Emacs Lisp 86 SLoC // 0.5% comments Vim Script 72 SLoC // 0.2% comments Visual Studio Solution 54 SLoC AWK 34 SLoC // 0.1% comments Objective-C++ 16 SLoC // 0.6% comments PowerShell 9 SLoC // 0.4% comments M4 8 SLoC NuGet Config 7 SLoC

protobuf-src

crates.io CI Rust Documentation

Rust build system integration with libprotobuf, the C++ implementation of Protocol Buffers, Google's data interchange format.

View documentation.

Installation

# Cargo.toml
[dependencies]
protobuf-src = "2.0.0"

lib.rs:

Build system integration with libprotobuf, the C++ implementation of Protocol Buffers, Google's data interchange format.

Maintainership

This crate is maintained by Materialize. Contributions are encouraged:

Details

This crate builds a vendored copy of libprotobuf and protoc using Cargo's support for custom build scripts. It is not intended for direct consumption, but as a dependency for other crates that need libprotobuf or protoc available, like prost-build.

protobuf-src is currently bundling protobuf v3.19.1.

To use this crate, declare a dependency or dev-dependency on protobuf-src. Then, in the build script for your crate, the environment variable DEP_PROTOBUF_SRC_ROOT will point to the directory in which the bundled copy of protobuf has been installed. You can build and link another C/C++ library against this copy of libprotobuf or generate Rust bindings and link Rust code against this copy of libprotobuf.

If you simply need to invoke the vendored protoc binary, protoc returns the path to pass to std::process::Command.

Dependencies