16 releases (9 breaking)

0.10.3 May 5, 2022
0.10.1 Apr 13, 2022
0.10.0 Mar 29, 2022
0.9.0 Oct 13, 2021
0.1.0 Jun 25, 2017

#69 in Network programming

Download history 183042/week @ 2022-01-29 155333/week @ 2022-02-05 155913/week @ 2022-02-12 141469/week @ 2022-02-19 152158/week @ 2022-02-26 154990/week @ 2022-03-05 157864/week @ 2022-03-12 177979/week @ 2022-03-19 196702/week @ 2022-03-26 198890/week @ 2022-04-02 198698/week @ 2022-04-09 199826/week @ 2022-04-16 196755/week @ 2022-04-23 187435/week @ 2022-04-30 201582/week @ 2022-05-07 190073/week @ 2022-05-14

813,969 downloads per month
Used in 649 crates (201 directly)

Apache-2.0

23MB
457K SLoC

C++ 170K SLoC // 0.1% comments C# 78K SLoC // 0.1% comments Objective-C 53K SLoC // 0.1% comments C 33K SLoC // 0.1% comments JavaScript 31K SLoC // 0.3% comments Python 25K SLoC // 0.3% comments Java 21K SLoC // 0.2% comments PHP 15K SLoC // 0.3% comments Prolog 8K SLoC // 0.0% comments Ruby 6K SLoC // 0.1% comments Rust 5.5K SLoC // 0.0% comments Shell 4K SLoC // 0.3% comments Automake 3.5K SLoC // 0.1% comments K 1.5K SLoC // 0.1% comments Visual Studio Project 797 SLoC Go 416 SLoC // 0.1% comments Swift 351 SLoC // 0.1% comments Visual Studio Solution 294 SLoC Batch 239 SLoC // 0.1% comments Coq 198 SLoC Emacs Lisp 96 SLoC // 0.5% comments Dart 90 SLoC // 0.1% comments Vim script 72 SLoC // 0.2% comments INI 36 SLoC // 0.2% comments Kotlin 34 SLoC // 0.8% comments Objective-C++ 16 SLoC // 0.7% comments PowerShell 9 SLoC // 0.4% comments

Documentation Crate

prost-build

prost-build makes it easy to generate Rust code from .proto files as part of a Cargo build. See the crate documentation for examples of how to integrate prost-build into a Cargo project.

protoc

prost-build uses protoc to parse the proto files. There are a few ways to make protoc available for prost-build.

The first option is to include protoc in your PATH this can be done by following the protoc install instructions. In addition, its possible to pass the PROTOC=<my/path/to/protoc> environment variable.

The second option is to provide the vendored feature flag to prost-build. This will force prost-build to compile protoc from the bundled source. This will require that you have the correct dependencies installed include a C++ toolchain, cmake, etc. For more info on what the required dependencies are check here.

If you would like to always ignore vendoring protoc you can additionally pass PROTOC_NO_VENDOR and this will always check the PATH/PROTOC environment variables and never compile protoc from source.

License

prost-build is distributed under the terms of the Apache License (Version 2.0).

See LICENSE for details.

Copyright 2017 Dan Burkert

Dependencies

~3–4MB
~98K SLoC