- update: made changes for new proto paths - add: skills to character table - add: load and send skills to client from db - add: chat proto
17 lines
717 B
Rust
17 lines
717 B
Rust
fn main() {
|
|
// gRPC Server code
|
|
tonic_build::configure()
|
|
.build_server(true) // Generate gRPC server code
|
|
.compile_well_known_types(true)
|
|
.type_attribute(".", "#[derive(serde::Serialize, serde::Deserialize)]")
|
|
.compile_protos(&["../proto/common.proto", "../proto/session_service_api.proto"], &["../proto"])
|
|
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
|
|
|
// gRPC Client code
|
|
tonic_build::configure()
|
|
.build_server(false)
|
|
.compile_well_known_types(true)
|
|
.compile_protos(&["../proto/user_db_api.proto", "../proto/auth.proto"], &["../proto"])
|
|
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
|
}
|