Skip to content

Commit

Permalink
Merge pull request #106 from comath/rkyv-support
Browse files Browse the repository at this point in the history
rkyv support
  • Loading branch information
starkat99 authored Feb 25, 2024
2 parents c57c9e9 + 839a0aa commit ee8cabb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ num-traits = { version = "0.2.14", default-features = false, features = ["libm"]
zerocopy = { version = "0.6.0", default-features = false, optional = true }
rand = { version = "0.8.5", default-features = false, optional = true }
rand_distr = { version = "0.4.3", default-features = false, optional = true }
rkyv = { version = "0.7", optional = true }

[target.'cfg(target_arch = "spirv")'.dependencies]
crunchy = "0.2.2"
Expand Down
2 changes: 2 additions & 0 deletions src/bfloat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ pub(crate) mod convert;
#[derive(Clone, Copy, Default)]
#[repr(transparent)]
#[cfg_attr(feature = "serde", derive(Serialize))]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))]
#[cfg_attr(feature = "rkyv", archive(resolver = "Bf16Resolver"))]
#[cfg_attr(feature = "bytemuck", derive(Zeroable, Pod))]
#[cfg_attr(feature = "zerocopy", derive(AsBytes, FromBytes))]
#[cfg_attr(kani, derive(kani::Arbitrary))]
Expand Down
2 changes: 2 additions & 0 deletions src/binary16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub(crate) mod arch;
#[derive(Clone, Copy, Default)]
#[repr(transparent)]
#[cfg_attr(feature = "serde", derive(Serialize))]
#[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize))]
#[cfg_attr(feature = "rkyv", archive(resolver = "F16Resolver"))]
#[cfg_attr(feature = "bytemuck", derive(Zeroable, Pod))]
#[cfg_attr(feature = "zerocopy", derive(AsBytes, FromBytes))]
#[cfg_attr(kani, derive(kani::Arbitrary))]
Expand Down

0 comments on commit ee8cabb

Please sign in to comment.