Skip to content

Add libm feature to allow no_std compilation - #371

Open
bushrat011899 wants to merge 1 commit into
Razaekel:developfrom
bushrat011899:no_std
Open

Add libm feature to allow no_std compilation#371
bushrat011899 wants to merge 1 commit into
Razaekel:developfrom
bushrat011899:no_std

Conversation

@bushrat011899

Copy link
Copy Markdown

Objective

Currently, no_std targets such as wasm32v1-none fail to compile, as num-traits has its std feature permanently enabled. Additionally, without std linked, several important floating point methods are unavailable. This can be fixed by using num-traits::Float and enabling the libm feature.

Solution

  • Disable default features on num-traits to ensure std is not unconditionally enabled.
  • Add a new libm feature which enables num-traits/libm
  • Add num-traits/std to the std feature
  • Enable std by default

Notes

  • No AI tooling of any kind was used during the creation of this PR.

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.

1 participant