forked from M-Labs/nalgebra
Merge pull request #1259 from dimforge/no-explicit-bytecheck-dep
chore: remove explicit bytecheck dependency
This commit is contained in:
commit
296e6f5690
@ -58,7 +58,7 @@ convert-glam024 = [ "glam024" ]
|
|||||||
serde-serialize-no-std = [ "serde", "num-complex/serde" ]
|
serde-serialize-no-std = [ "serde", "num-complex/serde" ]
|
||||||
serde-serialize = [ "serde-serialize-no-std", "serde/std" ]
|
serde-serialize = [ "serde-serialize-no-std", "serde/std" ]
|
||||||
rkyv-serialize-no-std = [ "rkyv/size_32" ]
|
rkyv-serialize-no-std = [ "rkyv/size_32" ]
|
||||||
rkyv-serialize = [ "rkyv-serialize-no-std", "rkyv/std", "rkyv/validation", "bytecheck" ]
|
rkyv-serialize = [ "rkyv-serialize-no-std", "rkyv/std", "rkyv/validation" ]
|
||||||
|
|
||||||
# Randomness
|
# Randomness
|
||||||
## To use rand in a #[no-std] environment, enable the
|
## To use rand in a #[no-std] environment, enable the
|
||||||
@ -85,8 +85,7 @@ alga = { version = "0.9", default-features = false, optional = true }
|
|||||||
rand_distr = { version = "0.4", default-features = false, optional = true }
|
rand_distr = { version = "0.4", default-features = false, optional = true }
|
||||||
matrixmultiply = { version = "0.3", optional = true }
|
matrixmultiply = { version = "0.3", optional = true }
|
||||||
serde = { version = "1.0", default-features = false, features = [ "derive" ], optional = true }
|
serde = { version = "1.0", default-features = false, features = [ "derive" ], optional = true }
|
||||||
rkyv = { version = "0.7", default-features = false, optional = true }
|
rkyv = { version = "0.7.41", default-features = false, optional = true }
|
||||||
bytecheck = { version = "~0.6.1", optional = true }
|
|
||||||
mint = { version = "0.5", optional = true }
|
mint = { version = "0.5", optional = true }
|
||||||
quickcheck = { version = "1", optional = true }
|
quickcheck = { version = "1", optional = true }
|
||||||
pest = { version = "2", optional = true }
|
pest = { version = "2", optional = true }
|
||||||
|
@ -11,6 +11,9 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
|||||||
#[cfg(feature = "serde-serialize-no-std")]
|
#[cfg(feature = "serde-serialize-no-std")]
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
use crate::base::allocator::Allocator;
|
use crate::base::allocator::Allocator;
|
||||||
use crate::base::default_allocator::DefaultAllocator;
|
use crate::base::default_allocator::DefaultAllocator;
|
||||||
use crate::base::dimension::{Const, ToTypenum};
|
use crate::base::dimension::{Const, ToTypenum};
|
||||||
|
@ -8,6 +8,8 @@ use std::fmt::Debug;
|
|||||||
use std::ops::{Add, Div, Mul, Sub};
|
use std::ops::{Add, Div, Mul, Sub};
|
||||||
use typenum::{self, Diff, Max, Maximum, Min, Minimum, Prod, Quot, Sum, Unsigned};
|
use typenum::{self, Diff, Max, Maximum, Min, Minimum, Prod, Quot, Sum, Unsigned};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
#[cfg(feature = "serde-serialize-no-std")]
|
#[cfg(feature = "serde-serialize-no-std")]
|
||||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
|||||||
|
|
||||||
#[cfg(feature = "rkyv-serialize-no-std")]
|
#[cfg(feature = "rkyv-serialize-no-std")]
|
||||||
use super::rkyv_wrappers::CustomPhantom;
|
use super::rkyv_wrappers::CustomPhantom;
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
#[cfg(feature = "rkyv-serialize-no-std")]
|
#[cfg(feature = "rkyv-serialize-no-std")]
|
||||||
use rkyv::{with::With, Archive, Archived};
|
use rkyv::{with::With, Archive, Archived};
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ use crate::base::DefaultAllocator;
|
|||||||
use crate::storage::RawStorage;
|
use crate::storage::RawStorage;
|
||||||
use crate::{Dim, Matrix, OMatrix, RealField, Scalar, SimdComplexField, SimdRealField};
|
use crate::{Dim, Matrix, OMatrix, RealField, Scalar, SimdComplexField, SimdRealField};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A wrapper that ensures the underlying algebraic entity has a unit norm.
|
/// A wrapper that ensures the underlying algebraic entity has a unit norm.
|
||||||
///
|
///
|
||||||
/// **It is likely that the only piece of documentation that you need in this page are:**
|
/// **It is likely that the only piece of documentation that you need in this page are:**
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
// The macros break if the references are taken out, for some reason.
|
// The macros break if the references are taken out, for some reason.
|
||||||
#![allow(clippy::op_ref)]
|
#![allow(clippy::op_ref)]
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
Isometry3, Matrix4, Normed, OVector, Point3, Quaternion, Scalar, SimdRealField, Translation3,
|
Isometry3, Matrix4, Normed, OVector, Point3, Quaternion, Scalar, SimdRealField, Translation3,
|
||||||
Unit, UnitQuaternion, Vector3, Zero, U8,
|
Unit, UnitQuaternion, Vector3, Zero, U8,
|
||||||
|
3
src/geometry/isometry.rs
Executable file → Normal file
3
src/geometry/isometry.rs
Executable file → Normal file
@ -14,6 +14,9 @@ use crate::base::storage::Owned;
|
|||||||
use crate::base::{Const, DefaultAllocator, OMatrix, SVector, Scalar, Unit};
|
use crate::base::{Const, DefaultAllocator, OMatrix, SVector, Scalar, Unit};
|
||||||
use crate::geometry::{AbstractRotation, Point, Translation};
|
use crate::geometry::{AbstractRotation, Point, Translation};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A direct isometry, i.e., a rotation followed by a translation (aka. a rigid-body motion).
|
/// A direct isometry, i.e., a rotation followed by a translation (aka. a rigid-body motion).
|
||||||
///
|
///
|
||||||
/// This is also known as an element of a Special Euclidean (SE) group.
|
/// This is also known as an element of a Special Euclidean (SE) group.
|
||||||
|
@ -17,6 +17,9 @@ use crate::base::{Matrix4, Vector, Vector3};
|
|||||||
|
|
||||||
use crate::geometry::{Point3, Projective3};
|
use crate::geometry::{Point3, Projective3};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A 3D orthographic projection stored as a homogeneous 4x4 matrix.
|
/// A 3D orthographic projection stored as a homogeneous 4x4 matrix.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -18,6 +18,9 @@ use crate::base::{Matrix4, Vector, Vector3};
|
|||||||
|
|
||||||
use crate::geometry::{Point3, Projective3};
|
use crate::geometry::{Point3, Projective3};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A 3D perspective projection stored as a homogeneous 4x4 matrix.
|
/// A 3D perspective projection stored as a homogeneous 4x4 matrix.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -4,6 +4,8 @@ use std::cmp::Ordering;
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash;
|
use std::hash;
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
#[cfg(feature = "serde-serialize-no-std")]
|
#[cfg(feature = "serde-serialize-no-std")]
|
||||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||||
|
|
||||||
|
3
src/geometry/quaternion.rs
Executable file → Normal file
3
src/geometry/quaternion.rs
Executable file → Normal file
@ -19,6 +19,9 @@ use crate::base::{
|
|||||||
|
|
||||||
use crate::geometry::{Point3, Rotation};
|
use crate::geometry::{Point3, Rotation};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A quaternion. See the type alias `UnitQuaternion = Unit<Quaternion>` for a quaternion
|
/// A quaternion. See the type alias `UnitQuaternion = Unit<Quaternion>` for a quaternion
|
||||||
/// that may be used as a rotation.
|
/// that may be used as a rotation.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
|
3
src/geometry/rotation.rs
Executable file → Normal file
3
src/geometry/rotation.rs
Executable file → Normal file
@ -17,6 +17,9 @@ use crate::base::dimension::{DimNameAdd, DimNameSum, U1};
|
|||||||
use crate::base::{Const, DefaultAllocator, OMatrix, SMatrix, SVector, Scalar, Unit};
|
use crate::base::{Const, DefaultAllocator, OMatrix, SMatrix, SVector, Scalar, Unit};
|
||||||
use crate::geometry::Point;
|
use crate::geometry::Point;
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A rotation matrix.
|
/// A rotation matrix.
|
||||||
///
|
///
|
||||||
/// This is also known as an element of a Special Orthogonal (SO) group.
|
/// This is also known as an element of a Special Orthogonal (SO) group.
|
||||||
|
3
src/geometry/scale.rs
Executable file → Normal file
3
src/geometry/scale.rs
Executable file → Normal file
@ -15,6 +15,9 @@ use crate::ClosedMul;
|
|||||||
|
|
||||||
use crate::geometry::Point;
|
use crate::geometry::Point;
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A scale which supports non-uniform scaling.
|
/// A scale which supports non-uniform scaling.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
3
src/geometry/similarity.rs
Executable file → Normal file
3
src/geometry/similarity.rs
Executable file → Normal file
@ -15,6 +15,9 @@ use crate::base::storage::Owned;
|
|||||||
use crate::base::{Const, DefaultAllocator, OMatrix, SVector, Scalar};
|
use crate::base::{Const, DefaultAllocator, OMatrix, SVector, Scalar};
|
||||||
use crate::geometry::{AbstractRotation, Isometry, Point, Translation};
|
use crate::geometry::{AbstractRotation, Isometry, Point, Translation};
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A similarity, i.e., an uniform scaling, followed by a rotation, followed by a translation.
|
/// A similarity, i.e., an uniform scaling, followed by a rotation, followed by a translation.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
|
3
src/geometry/translation.rs
Executable file → Normal file
3
src/geometry/translation.rs
Executable file → Normal file
@ -15,6 +15,9 @@ use crate::base::{Const, DefaultAllocator, OMatrix, SVector, Scalar};
|
|||||||
|
|
||||||
use crate::geometry::Point;
|
use crate::geometry::Point;
|
||||||
|
|
||||||
|
#[cfg(feature = "rkyv-serialize")]
|
||||||
|
use rkyv::bytecheck;
|
||||||
|
|
||||||
/// A translation.
|
/// A translation.
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
Loading…
Reference in New Issue
Block a user