diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7d7a3e4 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +# v0.1.2 + +- Add optional `rkyv 0.8` support. \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 63dc1d8..5fc0df5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "glamx" -version = "0.1.1" +version = "0.1.2" authors = ["Sébastien Crozet "] description = "Extensions for glam: Pose2, Pose3, Rot2, and matrix utilities." @@ -50,7 +50,7 @@ glam-assert = ["glam/glam-assert"] fast-math = ["glam/fast-math"] # Rkyv serialization -rkyv = ["glam/rkyv"] +rkyv = ["dep:rkyv", "glam/rkyv"] # Mint interop mint = ["glam/mint"] @@ -68,6 +68,7 @@ approx = { version = "0.5", default-features = false, optional = true } serde = { version = "1.0", optional = true, features = ["derive"] } bytemuck = { version = "1", features = ["derive"], optional = true } nalgebra = { version = "0.34", default-features = false, features = ["convert-glam030"], optional = true } +rkyv = { version = "0.8", optional = true, default-features = false } [dev-dependencies] approx = "0.5" diff --git a/src/pose2.rs b/src/pose2.rs index d3e7244..2e17f5a 100644 --- a/src/pose2.rs +++ b/src/pose2.rs @@ -9,6 +9,7 @@ macro_rules! impl_pose2 { #[doc = concat!("A 2D pose (rotation + translation), representing a rigid body transformation (", stringify!($Real), " precision).")] #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))] $(#[$attr])* pub struct $Pose2 { /// The rotational part of the pose. diff --git a/src/pose3.rs b/src/pose3.rs index 538d184..26edf41 100644 --- a/src/pose3.rs +++ b/src/pose3.rs @@ -9,6 +9,7 @@ macro_rules! impl_pose3 { #[doc = concat!("A 3D pose (rotation + translation), representing a rigid body transformation (", stringify!($Real), " precision).")] #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))] $(#[$attr])* pub struct $Pose3 { /// The rotational part of the pose. diff --git a/src/rot2.rs b/src/rot2.rs index ac81c5e..4ec543f 100644 --- a/src/rot2.rs +++ b/src/rot2.rs @@ -12,6 +12,7 @@ macro_rules! impl_rot2 { #[derive(Copy, Clone, Debug, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "bytemuck", derive(bytemuck::Pod, bytemuck::Zeroable))] + #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))] #[repr(C)] $(#[$attr])* pub struct $Rot2 {