diff --git a/Cargo.toml b/Cargo.toml index 778b17d..e2f9fd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -74,8 +74,8 @@ serde_json = { version = "1.0.96", optional = true } simd-json = { version = "0.9.2", optional = true } simd-json-derive = { version = "0.9.2", optional = true } speedy = { version = "0.8.6", optional = true } -savefile = { version = "0.13", optional = true } -savefile-derive = { version = "0.13", optional = true } +savefile = { version = "0.14", optional = true } +savefile-derive = { version = "0.14", optional = true } zstd = "0.12.3" [features] diff --git a/src/datasets/log/mod.rs b/src/datasets/log/mod.rs index e705722..fe2a881 100644 --- a/src/datasets/log/mod.rs +++ b/src/datasets/log/mod.rs @@ -29,9 +29,6 @@ use crate::bench_flatbuffers; use crate::bench_prost; use crate::Generate; -#[cfg(feature = "savefile")] -use savefile::prelude::ReprC; - #[derive(Clone, Copy)] #[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))] #[cfg_attr(feature = "bitcode", derive(bitcode::Encode, bitcode::Decode))] @@ -56,7 +53,7 @@ use savefile::prelude::ReprC; )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))] pub struct Address { pub x0: u8, pub x1: u8, diff --git a/src/datasets/mesh/mod.rs b/src/datasets/mesh/mod.rs index 819dd69..dd69295 100644 --- a/src/datasets/mesh/mod.rs +++ b/src/datasets/mesh/mod.rs @@ -27,9 +27,6 @@ use crate::bench_flatbuffers; use crate::bench_prost; use crate::Generate; -#[cfg(feature = "savefile")] -use savefile::prelude::ReprC; - #[derive(Clone, Copy)] #[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))] #[cfg_attr(feature = "bitcode", derive(bitcode::Encode, bitcode::Decode))] @@ -55,7 +52,7 @@ use savefile::prelude::ReprC; )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))] pub struct Vector3 { pub x: f32, pub y: f32, @@ -144,7 +141,7 @@ impl alkahest::Pack for Vector3 { )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast, repr(C))] pub struct Triangle { pub v0: Vector3, pub v1: Vector3, diff --git a/src/datasets/minecraft_savedata/mod.rs b/src/datasets/minecraft_savedata/mod.rs index 6cc27b4..f770b33 100644 --- a/src/datasets/minecraft_savedata/mod.rs +++ b/src/datasets/minecraft_savedata/mod.rs @@ -28,8 +28,6 @@ use crate::bench_flatbuffers; #[cfg(feature = "prost")] use crate::bench_prost; use crate::{generate_vec, Generate}; -#[cfg(feature = "savefile")] -use savefile::prelude::ReprC; #[derive(Clone, Copy)] #[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))] @@ -55,7 +53,7 @@ use savefile::prelude::ReprC; )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast)] #[repr(u8)] pub enum GameType { Survival, @@ -269,7 +267,7 @@ impl alkahest::Pack for &'_ Item { )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile), repr(C))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile))] pub struct Abilities { #[cfg_attr(feature = "bitcode", bitcode_hint(expected_range = "0.0..1.0"))] pub walk_speed: f32, diff --git a/src/datasets/mk48/mod.rs b/src/datasets/mk48/mod.rs index ac7af5d..8b1e708 100644 --- a/src/datasets/mk48/mod.rs +++ b/src/datasets/mk48/mod.rs @@ -30,8 +30,6 @@ use crate::bench_flatbuffers; #[cfg(feature = "prost")] use crate::bench_prost; use crate::{generate_vec, Generate}; -#[cfg(feature = "savefile")] -use savefile::prelude::ReprC; #[derive(Copy, Clone, Debug)] #[cfg_attr(feature = "abomonation", derive(abomonation_derive::Abomonation))] @@ -57,7 +55,7 @@ use savefile::prelude::ReprC; )] #[cfg_attr(feature = "speedy", derive(speedy::Readable, speedy::Writable))] #[cfg_attr(feature = "alkahest", derive(alkahest::Schema))] -#[cfg_attr(feature = "savefile", derive(savefile_derive::ReprC, savefile_derive::Savefile))] +#[cfg_attr(feature = "savefile", derive(savefile_derive::Savefile), savefile_unsafe_and_fast)] #[repr(u8)] pub enum EntityType { #[cfg_attr(feature = "bitcode", bitcode_hint(frequency = 2.14))]