Returns the path to the protobuf includes directory. Note: this is primarily used to include "well known types".
()
| 40 | /// |
| 41 | /// Note: this is primarily used to include "well known types". |
| 42 | pub fn protoc_include() -> PathBuf { |
| 43 | cfg_if! { |
| 44 | if #[cfg(feature = "protobuf-src")] { |
| 45 | protobuf_src::include() |
| 46 | } else { |
| 47 | let path = std::option_env!("PROTOC_INCLUDE").unwrap_or_default(); |
| 48 | PathBuf::from(path) |
| 49 | } |
| 50 | } |
| 51 | } |