master
Able 2022-01-19 13:52:26 -06:00
parent 8b4036d55d
commit d3bcd0d41c
Signed by: able
GPG Key ID: D164AF5F5700BE51
2 changed files with 14 additions and 11 deletions

View File

@ -6,14 +6,16 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies.bincode]
git = "https://github.com/bincode-org/bincode.git"
default-features = false
features = ["serde_no_std", "derive"]
[dependencies.serde]
version = "*"
default-features = false
features = ["derive", "alloc"]
[dependencies.rkyv]
version = "0.7.29"
default-features = false
features = ["size_64"]

View File

@ -3,9 +3,10 @@
extern crate alloc;
use alloc::vec::Vec;
use bincode::{Decode, Encode};
#[derive(Encode, Decode, PartialEq, Debug)]
use rkyv::{Archive, Deserialize, Serialize};
#[derive(Archive, Deserialize, Serialize, PartialEq, Debug)]
pub struct WindowOption {
// funct: WindowFunction,
symbol: char,
@ -14,13 +15,13 @@ pub struct WindowOption {
pub type WindowBar = Vec<WindowOption>;
pub type WindowID = u64;
#[derive(Encode, Decode, PartialEq, Debug)]
#[derive(Archive, Deserialize, Serialize, PartialEq, Debug)]
pub struct Window {
// bar: WindowBar,
}
// TODO: Seperate out this versioning into ableos-ver
#[derive(Encode, Decode, PartialEq, Debug)]
#[derive(Archive, Deserialize, Serialize, PartialEq, Debug)]
pub struct Version {
pub major: u8,
pub minor: u8,
@ -29,7 +30,7 @@ pub struct Version {
pub type WindowFunction = fn() -> ();
#[derive(Encode, Decode, PartialEq, Debug)]
#[derive(Archive, Deserialize, Serialize, PartialEq, Debug)]
pub enum Protocol {
Version(Version),