diff --git a/Cargo.toml b/Cargo.toml
index b657e6a2..9d0b1a7c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -54,8 +54,8 @@ convert-glam022 = [ "glam022" ]
 ## `serde-serialize`.
 serde-serialize-no-std = [ "serde", "num-complex/serde" ]
 serde-serialize        = [ "serde-serialize-no-std", "serde/std" ]
-rkyv-serialize-no-std  = [ "rkyv", "rkyv_wrappers", "num-complex/rkyv" ]
-rkyv-serialize         = [ "rkyv-serialize-no-std", "rkyv/std", "rkyv/validation", "bytecheck", "num-complex/bytecheck" ]
+rkyv-serialize-no-std  = [ "rkyv/size_32" ]
+rkyv-serialize         = [ "rkyv-serialize-no-std", "rkyv/std", "rkyv/validation", "bytecheck" ]
 
 # Randomness
 ## To use rand in a #[no-std] environment, enable the
@@ -83,7 +83,6 @@ rand_distr     = { version = "0.4", default-features = false, optional = true }
 matrixmultiply = { version = "0.3", optional = true }
 serde          = { version = "1.0", default-features = false, features = [ "derive" ], optional = true }
 rkyv           = { version = "0.7", default-features = false, optional = true }
-rkyv_wrappers  = { git = "https://github.com/rkyv/rkyv_contrib", optional = true }
 bytecheck      = { version = "~0.6.1", optional = true }
 mint           = { version = "0.5", optional = true }
 quickcheck     = { version = "1", optional = true }
@@ -138,6 +137,3 @@ lto = true
 [package.metadata.docs.rs]
 # Enable all the features when building the docs on docs.rs
 all-features = true
-
-[patch.crates-io]
-num-complex = { git = "https://github.com/zyansheep/num-complex" }
\ No newline at end of file
diff --git a/src/base/array_storage.rs b/src/base/array_storage.rs
index 94ed8bb0..5c165399 100644
--- a/src/base/array_storage.rs
+++ b/src/base/array_storage.rs
@@ -38,10 +38,7 @@ use std::mem;
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct ArrayStorage<T, const R: usize, const C: usize>(pub [[T; R]; C]);
 
diff --git a/src/base/dimension.rs b/src/base/dimension.rs
index 06697618..3d1de1ff 100644
--- a/src/base/dimension.rs
+++ b/src/base/dimension.rs
@@ -208,12 +208,10 @@ dim_ops!(
 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
 #[cfg_attr(
     feature = "rkyv-serialize-no-std",
-    derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
-)]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
+    derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize),
+    archive(as = "Self")
 )]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct Const<const R: usize>;
 
diff --git a/src/base/matrix.rs b/src/base/matrix.rs
index 8f664dd4..700e2f02 100644
--- a/src/base/matrix.rs
+++ b/src/base/matrix.rs
@@ -12,9 +12,9 @@ use std::mem;
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 
 #[cfg(feature = "rkyv-serialize-no-std")]
-use rkyv::{with::With, Archive, Archived};
+use super::rkyv_wrappers::CustomPhantom;
 #[cfg(feature = "rkyv-serialize-no-std")]
-use rkyv_wrappers::custom_phantom::CustomPhantom;
+use rkyv::{with::With, Archive, Archived};
 
 use simba::scalar::{ClosedAdd, ClosedMul, ClosedSub, Field, SupersetOf};
 use simba::simd::SimdPartialOrd;
@@ -167,10 +167,7 @@ pub type MatrixCross<T, R1, C1, R2, C2> =
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct Matrix<T, R, C, S> {
     /// The data storage that contains all the matrix components. Disappointed?
diff --git a/src/base/mod.rs b/src/base/mod.rs
index dfe7cc8d..4cbcff93 100644
--- a/src/base/mod.rs
+++ b/src/base/mod.rs
@@ -42,6 +42,9 @@ mod min_max;
 /// Mechanisms for working with values that may not be initialized.
 pub mod uninit;
 
+#[cfg(feature = "rkyv-serialize-no-std")]
+mod rkyv_wrappers;
+
 pub use self::matrix::*;
 pub use self::norm::*;
 pub use self::scalar::*;
diff --git a/src/base/rkyv_wrappers.rs b/src/base/rkyv_wrappers.rs
new file mode 100644
index 00000000..b11c618a
--- /dev/null
+++ b/src/base/rkyv_wrappers.rs
@@ -0,0 +1,72 @@
+//! Wrapper that allows changing the generic type of a PhantomData<T>
+//!
+//! Copied from https://github.com/rkyv/rkyv_contrib (MIT-Apache2 licences) which isn’t published yet.
+
+use rkyv::{
+    with::{ArchiveWith, DeserializeWith, SerializeWith},
+    Fallible,
+};
+use std::marker::PhantomData;
+
+/// A wrapper that allows for changing the generic type of a PhantomData<T>.
+///
+/// Example:
+///
+/// ```rust
+/// use std::marker::PhantomData;
+/// use rkyv::{
+///     Archive, Serialize, Deserialize, Infallible, vec::ArchivedVec, Archived, with::With,
+/// };
+/// use rkyv_wrappers::custom_phantom::CustomPhantom;
+/// #[derive(Archive, Serialize, Deserialize, Debug, PartialEq, Eq, Default)]
+/// #[archive(as = "StructWithPhantom<T::Archived>", bound(archive = "
+/// 	T: Archive,
+/// 	With<PhantomData<T>, CustomPhantom<Archived<T>>>: Archive<Archived = PhantomData<Archived<T>>>
+/// "))]
+/// struct StructWithPhantom<T> {
+/// 	pub num: i32,
+///     #[with(CustomPhantom<T::Archived>)]
+///     pub phantom: PhantomData<T>,
+/// }
+/// let value = StructWithPhantom::<Vec<i32>>::default();
+/// let bytes = rkyv::to_bytes::<_, 1024>(&value).unwrap();
+/// let archived: &StructWithPhantom<ArchivedVec<i32>> = unsafe { rkyv::archived_root::<StructWithPhantom<Vec<i32>>>(&bytes) };
+///
+/// let deserialized: StructWithPhantom<Vec<i32>> = archived.deserialize(&mut Infallible).unwrap();
+/// assert_eq!(deserialized, value);
+/// ```
+pub struct CustomPhantom<NT: ?Sized> {
+    _data: PhantomData<*const NT>,
+}
+
+impl<OT: ?Sized, NT: ?Sized> ArchiveWith<PhantomData<OT>> for CustomPhantom<NT> {
+    type Archived = PhantomData<NT>;
+    type Resolver = ();
+
+    #[inline]
+    unsafe fn resolve_with(
+        _: &PhantomData<OT>,
+        _: usize,
+        _: Self::Resolver,
+        _: *mut Self::Archived,
+    ) {
+    }
+}
+
+impl<OT: ?Sized, NT: ?Sized, S: Fallible + ?Sized> SerializeWith<PhantomData<OT>, S>
+    for CustomPhantom<NT>
+{
+    #[inline]
+    fn serialize_with(_: &PhantomData<OT>, _: &mut S) -> Result<Self::Resolver, S::Error> {
+        Ok(())
+    }
+}
+
+impl<OT: ?Sized, NT: ?Sized, D: Fallible + ?Sized>
+    DeserializeWith<PhantomData<NT>, PhantomData<OT>, D> for CustomPhantom<NT>
+{
+    #[inline]
+    fn deserialize_with(_: &PhantomData<NT>, _: &mut D) -> Result<PhantomData<OT>, D::Error> {
+        Ok(PhantomData)
+    }
+}
diff --git a/src/base/unit.rs b/src/base/unit.rs
index 3d6f677f..2fc51107 100644
--- a/src/base/unit.rs
+++ b/src/base/unit.rs
@@ -31,10 +31,7 @@ use crate::{Dim, Matrix, OMatrix, RealField, Scalar, SimdComplexField, SimdRealF
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 // #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct Unit<T> {
     pub(crate) value: T,
diff --git a/src/geometry/dual_quaternion.rs b/src/geometry/dual_quaternion.rs
index 828f7116..bae04f46 100644
--- a/src/geometry/dual_quaternion.rs
+++ b/src/geometry/dual_quaternion.rs
@@ -51,10 +51,7 @@ use simba::scalar::{ClosedNeg, RealField};
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct DualQuaternion<T> {
     /// The real component of the quaternion
diff --git a/src/geometry/orthographic.rs b/src/geometry/orthographic.rs
index 0368ee6f..06d0b471 100644
--- a/src/geometry/orthographic.rs
+++ b/src/geometry/orthographic.rs
@@ -30,10 +30,7 @@ use crate::geometry::{Point3, Projective3};
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 #[derive(Copy, Clone)]
 pub struct Orthographic3<T> {
diff --git a/src/geometry/perspective.rs b/src/geometry/perspective.rs
index 91e97efe..a5fc19a8 100644
--- a/src/geometry/perspective.rs
+++ b/src/geometry/perspective.rs
@@ -31,10 +31,7 @@ use crate::geometry::{Point3, Projective3};
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 #[derive(Copy, Clone)]
 pub struct Perspective3<T> {
diff --git a/src/geometry/quaternion.rs b/src/geometry/quaternion.rs
index 9dfc3ec3..1b251b29 100755
--- a/src/geometry/quaternion.rs
+++ b/src/geometry/quaternion.rs
@@ -29,15 +29,12 @@ use crate::geometry::{Point3, Rotation};
     archive(
         as = "Quaternion<T::Archived>",
         bound(archive = "
-        T: rkyv::Archive,
-        Vector4<T>: rkyv::Archive<Archived = Vector4<T::Archived>>
-    ")
+            T: rkyv::Archive,
+            Vector4<T>: rkyv::Archive<Archived = Vector4<T::Archived>>
+        ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 pub struct Quaternion<T> {
     /// This quaternion as a 4D vector of coordinates in the `[ x, y, z, w ]` storage order.
diff --git a/src/geometry/rotation.rs b/src/geometry/rotation.rs
index 2774cb14..5eceec21 100755
--- a/src/geometry/rotation.rs
+++ b/src/geometry/rotation.rs
@@ -60,10 +60,7 @@ use crate::geometry::Point;
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 #[derive(Copy, Clone)]
 pub struct Rotation<T, const D: usize> {
diff --git a/src/geometry/scale.rs b/src/geometry/scale.rs
index 93b2258f..36a68066 100755
--- a/src/geometry/scale.rs
+++ b/src/geometry/scale.rs
@@ -28,10 +28,7 @@ use crate::geometry::Point;
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 #[derive(Copy, Clone)]
 pub struct Scale<T, const D: usize> {
diff --git a/src/geometry/translation.rs b/src/geometry/translation.rs
index d44e891b..39fae3b6 100755
--- a/src/geometry/translation.rs
+++ b/src/geometry/translation.rs
@@ -28,10 +28,7 @@ use crate::geometry::Point;
     ")
     )
 )]
-#[cfg_attr(
-    feature = "rkyv-serialize",
-    archive_attr(derive(bytecheck::CheckBytes))
-)]
+#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
 #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
 #[derive(Copy, Clone)]
 pub struct Translation<T, const D: usize> {
diff --git a/tests/core/rkyv.rs b/tests/core/rkyv.rs
index 678e06d1..ffe9ed30 100644
--- a/tests/core/rkyv.rs
+++ b/tests/core/rkyv.rs
@@ -1,12 +1,11 @@
 #![cfg(feature = "rkyv-serialize")]
 
 use na::{
-    DMatrix, Isometry2, Isometry3, IsometryMatrix2, IsometryMatrix3, Matrix2x3, Matrix3x4, Point2,
-    Point3, Quaternion, Rotation2, Rotation3, Similarity2, Similarity3, SimilarityMatrix2,
-    SimilarityMatrix3, Translation2, Translation3, Unit, Vector2,
+    Isometry3, IsometryMatrix2, IsometryMatrix3, Matrix3x4, Point2, Point3, Quaternion, Rotation2,
+    Rotation3, Similarity3, SimilarityMatrix2, SimilarityMatrix3, Translation2, Translation3,
 };
 use rand;
-use rkyv::{Archive, Deserialize, Infallible, Serialize};
+use rkyv::{Deserialize, Infallible};
 
 macro_rules! test_rkyv_same_type(
     ($($test: ident, $ty: ident);* $(;)*) => {$(
@@ -52,9 +51,9 @@ test_rkyv_same_type!(
     rkyv_same_type_point2,             Point2;
     rkyv_same_type_translation2,       Translation2;
     rkyv_same_type_rotation2,          Rotation2;
-    rkyv_same_type_isometry2,          Isometry2;
+    // rkyv_same_type_isometry2,          Isometry2;
     rkyv_same_type_isometry_matrix2,   IsometryMatrix2;
-    rkyv_same_type_similarity2,        Similarity2;
+    // rkyv_same_type_similarity2,        Similarity2;
     rkyv_same_type_similarity_matrix2, SimilarityMatrix2;
 );