From f294e0e159821585528cde991360403d9f7b9f59 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Mon, 30 Jan 2023 03:42:58 +0100 Subject: [PATCH] use rkyv --- kubi-shared/Cargo.toml | 3 ++- kubi-shared/src/networking.rs | 1 + kubi-shared/src/networking/messages.rs | 11 +++++++++++ kubi/Cargo.toml | 1 - 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 kubi-shared/src/networking/messages.rs diff --git a/kubi-shared/Cargo.toml b/kubi-shared/Cargo.toml index 565c545..ff834cc 100644 --- a/kubi-shared/Cargo.toml +++ b/kubi-shared/Cargo.toml @@ -6,6 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math"] } +glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math", "rkyv"] } strum = { version = "0.24", features = ["derive"] } bracket-noise = "0.8" +rkyv = { version = "0.7", features = ["validation", "archive_le"] } diff --git a/kubi-shared/src/networking.rs b/kubi-shared/src/networking.rs index c07f47e..527f935 100644 --- a/kubi-shared/src/networking.rs +++ b/kubi-shared/src/networking.rs @@ -1,2 +1,3 @@ pub mod client; pub mod server; +pub mod messages; diff --git a/kubi-shared/src/networking/messages.rs b/kubi-shared/src/networking/messages.rs new file mode 100644 index 0000000..ba01e36 --- /dev/null +++ b/kubi-shared/src/networking/messages.rs @@ -0,0 +1,11 @@ +use rkyv::{Archive, Deserialize, Serialize}; + +#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)] +pub enum ClientToServerMessage { + Placeholder +} + +#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)] +pub enum ServerToClientMessage { + Placeholder +} diff --git a/kubi/Cargo.toml b/kubi/Cargo.toml index 6978a12..105d785 100644 --- a/kubi/Cargo.toml +++ b/kubi/Cargo.toml @@ -17,4 +17,3 @@ shipyard = { version = "0.6", features = ["thread_local"] } nohash-hasher = "0.2.0" anyhow = "1.0" flume = "0.10" -#rkyv = "0.7"