protoc_bin_vendored_linux_aarch_64/
lib.rs1use std::path::Path;
3use std::path::PathBuf;
4
5fn cargo_manifest_dir() -> &'static Path {
6 Path::new(env!("CARGO_MANIFEST_DIR"))
7}
8
9pub fn include_path() -> PathBuf {
10 let include_path = cargo_manifest_dir().join("include");
11 assert!(include_path.is_dir());
12 include_path
13}
14
15pub fn protoc_bin_path() -> PathBuf {
17 let protoc_bin_path = cargo_manifest_dir()
18 .join("bin")
19 .join("protoc");
20 assert!(
21 protoc_bin_path.exists(),
22 "internal: protoc not found {}",
23 protoc_bin_path.display(),
24 );
25 protoc_bin_path
26}
27
28#[cfg(test)]
29mod test {
30 use crate::include_path;
31 use crate::protoc_bin_path;
32
33 #[test]
34 fn smoke() {
35 assert!(include_path().exists());
36 assert!(protoc_bin_path().exists());
37 }
38}