mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-25 22:34:54 +01:00
changed build method for proto and lib proto includes
This commit is contained in:
parent
b78775239f
commit
ab982f4882
6 changed files with 23 additions and 17 deletions
19
build.rs
19
build.rs
|
@ -1,8 +1,15 @@
|
|||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
tonic_build::compile_protos("proto/model/cursor.proto")?;
|
||||
tonic_build::compile_protos("proto/model/user.proto")?;
|
||||
tonic_build::compile_protos("proto/buffer_service.proto")?;
|
||||
tonic_build::compile_protos("proto/cursor_service.proto")?;
|
||||
tonic_build::compile_protos("proto/workspace_service.proto")?;
|
||||
tonic_build::configure()
|
||||
.build_server(false)
|
||||
.compile(
|
||||
&[
|
||||
"proto/model/cursor.proto",
|
||||
"proto/model/user.proto",
|
||||
"proto/buffer_service.proto",
|
||||
"proto/cursor_service.proto",
|
||||
"proto/workspace_service.proto"
|
||||
],
|
||||
&["proto", "proto", "proto","proto", "proto"]
|
||||
)?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
syntax = "proto2";
|
||||
|
||||
package codemp.cursor_service;
|
||||
import "proto/model/cursor.proto";
|
||||
import "proto/model/user.proto";
|
||||
import "model/cursor.proto";
|
||||
import "model/user.proto";
|
||||
|
||||
// handle cursor events and broadcast to all users
|
||||
service Cursor {
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto2";
|
|||
|
||||
package codemp.model.cursor;
|
||||
|
||||
import "proto/model/user.proto";
|
||||
import "model/user.proto";
|
||||
|
||||
// empty request
|
||||
message MovedResponse {}
|
||||
|
|
|
@ -4,11 +4,7 @@ package codemp.model.user;
|
|||
|
||||
|
||||
// payload identifying user
|
||||
message UserIdentity {
|
||||
message UserIdentity{
|
||||
// user identifier
|
||||
required string id = 1;
|
||||
}
|
||||
|
||||
service User{
|
||||
|
||||
}
|
|
@ -25,7 +25,7 @@
|
|||
syntax = "proto2";
|
||||
|
||||
package codemp.workspace_service;
|
||||
import "proto/model/user.proto";
|
||||
import "model/user.proto";
|
||||
|
||||
|
||||
message Empty {}
|
||||
|
|
|
@ -165,8 +165,11 @@ pub use woot;
|
|||
#[cfg(feature = "proto")]
|
||||
#[allow(non_snake_case)]
|
||||
pub mod proto {
|
||||
tonic::include_proto!("codemp.buffer");
|
||||
tonic::include_proto!("codemp.cursor");
|
||||
tonic::include_proto!("codemp.model.cursor");
|
||||
tonic::include_proto!("codemp.model.user");
|
||||
tonic::include_proto!("codemp.buffer_service");
|
||||
tonic::include_proto!("codemp.cursor_service");
|
||||
tonic::include_proto!("codemp.workspace_service");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue