Skip to content

Conversation

@loadingalias
Copy link
Contributor

The Problem

Fixes #34 - no_std builds fail

Root Causes:

  1. The fusion module compiles in no_std but depends on imports only available with std
  2. avx512_vpclmulqdq.rs uses std::mem::transmute and println!
  3. The spin crate is an unconditional dep, but requires atomics unavailable on some no_std targets (Cortex-M0, etc.)

The Solution

  • Gate the fusion module on feature = "std"
  • Use core::mem::transmute instead of std::mem::transmute
  • Gate debug-only functions (print_hex, extract_u64s) with #[cfg(feature = "std")]
  • Make spin a target-conditional dependency (only included on aarch64/x86/x86_64 where it's actually used)

Changes

The code already conditionally uses spin only on SIMD-capable architectures. This PR makes the dependency conditional to match, allowing builds on targets without atomics.

Planned version bump

  • Which: PATCH
  • Why: Non-breaking bug fix for no_std builds

Links

Notes

Verified builds:

  • x86_64-unknown-uefi (original issue target)
  • thumbv6m-none-eabi (no atomics)
  • Default features (all tests pass)
  • CI is green

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doesn't build on no_std with no features or alloc enabled only

1 participant