-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.rs
46 lines (40 loc) · 1.54 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
_ _______ _______ _ __________________ _______
| \ /\( ___ )( ____ \( ( /|\__ __/\__ __/( ___ )
| \ / /| ( ) || ( \/| \ ( | ) ( ) ( | ( ) |
| (_/ / | | | || | | \ | | | | | | | (___) |
| _ ( | | | || | ____ | (\ \) | | | | | | ___ |
| ( \ \ | | | || | \_ )| | \ | | | | | | ( ) |
| / \ \| (___) || (___) || ) \ |___) (___ | | | ) ( |
|_/ \/(_______)(_______)|/ )_)\_______/ )_( |/ \|
@authors: free thinkers of the world
1. Qua Is X (Ukraine) [email protected]
/add your name here.../
*/
use std::{env, path::PathBuf};
use tonic_build;
// fn main() {
// tonic_build::compile_protos("proto/message.proto")
// .unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
// }
// fn main() -> Result<(), Box<dyn std::error::Error>> {
// tonic_build::configure()
// .build_server(false)
// .compile(
// &["proto/message.proto"],
// &["proto"],
// )?;
// Ok(())
// }
fn main() -> Result<(), Box<dyn std::error::Error>> {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
// tonic_build::configure()
// .file_descriptor_set_path(out_dir.join("message"))
// .compile(&["crates/p2p/model/message.proto"], &["message"])
// .unwrap();
// tonic_build::configure()
// .file_descriptor_set_path(out_dir.join("tx"))
// .compile(&["crates/tx/model/tx.proto"], &["tx"])
// .unwrap();
Ok(())
}