8 releases (stable)
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 |
#190 in Network programming
83,578 downloads per month
Used in 56 crates
(14 directly)
12MB
245K
SLoC
protobuf-src
Rust build system integration with libprotobuf, the C++ implementation of Protocol Buffers, Google's data interchange format.
Installation
# Cargo.toml
[dependencies]
protobuf-src = "1.1.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
].