mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-22 11:58:21 -06:00
replace rkyv
with serde
and bincode
change to serde
This commit is contained in:
parent
b0642028d1
commit
1f5b5853b2
|
@ -6,8 +6,8 @@ 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", "rkyv"] }
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "fast-math", "serde"] }
|
||||
strum = { version = "0.24", features = ["derive"] }
|
||||
bincode = { version = "2.0.0-rc", default_features = false, features = ["std", "serde"] }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
bracket-noise = "0.8"
|
||||
rkyv = { version = "0.7", features = ["validation", "archive_le"] }
|
||||
bytecheck = "*"
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
pub mod client;
|
||||
pub mod server;
|
||||
pub mod messages;
|
||||
|
|
|
@ -1,14 +1,27 @@
|
|||
use rkyv::{Archive, Deserialize, Serialize};
|
||||
use bytecheck::CheckBytes;
|
||||
use glam::{Vec3, Quat};
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
|
||||
#[archive_attr(derive(CheckBytes, Debug))]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub enum ClientToServerMessage {
|
||||
Placeholder
|
||||
ClientHello {
|
||||
username: String,
|
||||
password: Option<String>,
|
||||
},
|
||||
PositionChanged {
|
||||
position: Vec3,
|
||||
direction: Quat
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Archive, Deserialize, Serialize, Debug, PartialEq)]
|
||||
#[archive_attr(derive(CheckBytes, Debug))]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub enum ServerToClientMessage {
|
||||
Placeholder
|
||||
ServerHello {
|
||||
client_id: u16,
|
||||
},
|
||||
ServerFuckOff {
|
||||
reason: String,
|
||||
},
|
||||
PlayerPositionChanged {
|
||||
|
||||
},
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||
[dependencies]
|
||||
kubi-shared = { path = "../kubi-shared" }
|
||||
glium = "0.32"
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "mint", "fast-math"] }
|
||||
glam = { version = "0.22", features = ["debug-glam-assert", "fast-math"] }
|
||||
image = { version = "0.24", default_features = false, features = ["png"] }
|
||||
log = "0.4"
|
||||
env_logger = "0.10"
|
||||
|
|
Loading…
Reference in a new issue