Support platforms without 64-bit atomic types#12
Conversation
496b37d to
70d1eaf
Compare
|
Are you OK with MSRV on this? I think |
|
Looking through https://crates.io/crates/malloc-size-of/reverse_dependencies, it seems that (Except I just noticed that the Cargo Book recommends treating MSRV bumps as a minor change, i.e. just a patch version bump for a 0.x crate. Sorry, I'm a bit of a Rust novice.) |
As explained in https://doc.rust-lang.org/std/sync/atomic/#portability, some platforms don't have 64-bit atomic types. As a result of `smallvec` being used by `pydantic-core`, this crate is involved in some dependency chains in Debian where we currently support the armel and powerpc architectures, neither of which have these types. Since the `malloc_size_of_is_0!` macro just implements a trait on the types it's called with, it should be fine to skip types that don't exist on the target platform. Bumps MSRV to 1.60 for `#[cfg(target_has_atomic = "...")]`. Signed-off-by: Colin Watson <cjwatson@debian.org>
70d1eaf to
2aa5096
Compare
That's still somewhat controversial in the Rust community. And some of our dependent crates do care about MSRV. However, I think we're ok because this MSRV should only kick in for crates enabling the I think I'm going to merge/release this next week though. So I'm around just in case there are fires that need to be put out.
FYI, I'd expect you to not need to package this crate for the same reason. |
Yeah, I was struck by this as well. The dependency is disabled by default in smallvec; it would be worth your time to figure out why it's enabled in your case. |
As explained in https://doc.rust-lang.org/std/sync/atomic/#portability, some platforms don't have 64-bit atomic types. As a result of
smallvecbeing used bypydantic-core, this crate is involved in some dependency chains in Debian where we currently support the armel and powerpc architectures, neither of which have these types.Since the
malloc_size_of_is_0!macro just implements a trait on the types it's called with, it should be fine to skip types that don't exist on the target platform.Bumps MSRV to 1.60 for
#[cfg(target_has_atomic = "...")].