chore: removed tonic, using prost-build directly

This commit is contained in:
əlemi 2024-02-19 18:29:59 +01:00
parent e6b3f41540
commit 34ad2a8681
Signed by: alemi
GPG key ID: A4895B84D311642C
3 changed files with 6 additions and 10 deletions

View file

@ -19,12 +19,11 @@ prost = "0.12.3"
serde = { version = "1.0.196", features = ["derive"] } serde = { version = "1.0.196", features = ["derive"] }
tokio = { version = "1.36", features = ["net", "macros", "rt-multi-thread", "io-util"] } tokio = { version = "1.36", features = ["net", "macros", "rt-multi-thread", "io-util"] }
tokio-native-tls = "0.3.1" tokio-native-tls = "0.3.1"
tonic = "0.11.0"
tracing = "0.1.40" tracing = "0.1.40"
tracing-subscriber = "0.3.18" tracing-subscriber = "0.3.18"
[build-dependencies] [build-dependencies]
tonic-build = "0.11.0" prost-build = "0.12"
[features] [features]
default = [] default = []

View file

@ -1,9 +1,6 @@
fn main() -> Result<(), Box<dyn std::error::Error>> { fn main() -> Result<(), Box<dyn std::error::Error>> {
tonic_build::configure() Ok(prost_build::compile_protos(
.compile( &["src/tcp/mumble.proto"],
&["src/tcp/mumble.proto"], &["src/tcp"],
&["src/tcp"], )?)
)
.unwrap();
Ok(())
} }

View file

@ -3,7 +3,7 @@ pub mod control;
pub mod proto { pub mod proto {
use prost::Message; use prost::Message;
tonic::include_proto!("mumble"); include!(concat!(env!("OUT_DIR"), "/mumble.rs"));
#[derive(Debug)] #[derive(Debug)]
pub enum Packet { pub enum Packet {