-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a31019
commit b7b9c41
Showing
12 changed files
with
199 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "grpc"] | ||
path = grpc | ||
url = https://github.com/grpc/grpc | ||
[submodule "googleapis"] | ||
path = googleapis | ||
url = https://github.com/googleapis/googleapis |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,41 @@ | ||
use std::{env, fs, path::PathBuf}; | ||
|
||
fn main() -> anyhow::Result<()> { | ||
vergen::EmitBuilder::builder().git_sha(true).emit()?; | ||
|
||
let mut compiler = protox::Compiler::new(["grpc/src/proto", "googleapis", "proto"]).unwrap(); | ||
compiler | ||
.include_source_info(false) | ||
.include_imports(true) | ||
.open_files([ | ||
"grpc/health/v1/health.proto", | ||
"grpc/reflection/v1/reflection.proto", | ||
"google/rpc/status.proto", | ||
"google/rpc/error_details.proto", | ||
"lanquetta.proto", | ||
]) | ||
.unwrap(); | ||
|
||
for file in compiler.files() { | ||
if let Some(path) = file.path() { | ||
println!("cargo:rerun-if-changed={}", path.display()); | ||
} | ||
} | ||
|
||
fs::write( | ||
PathBuf::from(env::var_os("OUT_DIR").unwrap()).join("proto.bin"), | ||
compiler.encode_file_descriptor_set(), | ||
) | ||
.unwrap(); | ||
|
||
#[cfg(windows)] | ||
winres::WindowsResource::new() | ||
.set_icon_with_id( | ||
"img/logo.ico", | ||
&(windows::Win32::UI::WindowsAndMessaging::IDI_APPLICATION.0 as u32).to_string(), | ||
) | ||
.compile()?; | ||
println!("cargo:rerun-if-changed=img/logo.ico"); | ||
|
||
Ok(()) | ||
} |
Submodule googleapis
added at
3f11cd
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,8 @@ | ||
syntax = "proto3"; | ||
|
||
package lanquetta; | ||
|
||
message UnknownAny { | ||
string type_url = 1 [json_name = "@type"]; | ||
bytes value = 2; | ||
} |
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
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