-
Notifications
You must be signed in to change notification settings - Fork 15.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update example crate to import a .proto file from the well-known types
- Loading branch information
Showing
6 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
rust/release_crates/protobuf_well_known_types/crate_mapping.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
protobuf_well_known_types | ||
10 | ||
google/protobuf/any.proto | ||
google/protobuf/api.proto | ||
google/protobuf/duration.proto | ||
google/protobuf/empty.proto | ||
google/protobuf/field_mask.proto | ||
google/protobuf/source_context.proto | ||
google/protobuf/struct.proto | ||
google/protobuf/timestamp.proto | ||
google/protobuf/type.proto | ||
google/protobuf/wrappers.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
use std::path::Path; | ||
use std::path::PathBuf; | ||
|
||
include!(concat!(env!("OUT_DIR"), "/protobuf_generated/google/protobuf/generated.rs")); | ||
|
||
pub fn import_path() -> PathBuf { | ||
Path::new(env!("CARGO_MANIFEST_DIR")).join("proto") | ||
} | ||
|
||
pub fn include_path() -> PathBuf { | ||
Path::new(env!("OUT_DIR")).join("protobuf_generated") | ||
} | ||
|
||
pub fn crate_mapping() -> PathBuf { | ||
Path::new(env!("CARGO_MANIFEST_DIR")).join("crate_mapping.txt") | ||
} |