Skip to main content

protobuf_well_known_types/
lib.rs

1use std::path::Path;
2
3mod generated;
4pub use generated::*;
5
6pub fn get_dependency(crate_name: &str) -> Vec<protobuf_codegen::Dependency> {
7    vec![protobuf_codegen::Dependency {
8        crate_name: crate_name.to_string(),
9        proto_import_paths: vec![Path::new(env!("CARGO_MANIFEST_DIR")).join("proto")],
10        proto_files: vec![
11            "google/protobuf/any.proto".to_string(),
12            "google/protobuf/api.proto".to_string(),
13            "google/protobuf/duration.proto".to_string(),
14            "google/protobuf/empty.proto".to_string(),
15            "google/protobuf/field_mask.proto".to_string(),
16            "google/protobuf/source_context.proto".to_string(),
17            "google/protobuf/struct.proto".to_string(),
18            "google/protobuf/timestamp.proto".to_string(),
19            "google/protobuf/type.proto".to_string(),
20            "google/protobuf/wrappers.proto".to_string(),
21        ],
22    }]
23}