mz_build_tools

Function protoc

Source
pub fn protoc() -> PathBuf
Expand description

Returns the path to protoc.

Looks for protoc in the following places:

  • Bazel runfiles, if we’re building with Bazel.
  • Bootstraps protoc via protobuf-src, if default features are enabled.
  • PROTOC environment variable, if it’s set.
  • The system’s $PATH, via which.

If protoc can’t be found then this function will panic.