Skip to content

Clarify that libm is needed for no_std #415

@ChocolateLoverRaj

Description

@ChocolateLoverRaj

There are tons of errors when trying to build palette with --no-default-features.

How To Reproduce

  • Can reproduce on cargo 1.82.0-nightly (2f738d617 2024-08-13) and cargo 1.80.1 (376290515 2024-07-16)
  • Clone this repo
  • cd palette
  • Run cargo b --no-default-features

Expected Outcome

Builds without errors

Actual Outcome

32 errors. Here is one of them:

error[E0277]: the trait bound `f32: Round` is not satisfied
   --> palette/src/angle.rs:127:40
    |
127 |                     self - Round::ceil(((self + 180.0) / 360.0) - 1.0) * 360.0
    |                            ----------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Round` is not implemented for `f32`
    |                            |
    |                            required by a bound introduced by this call
...
179 | impl_angle_float!(f32, f64);
    | --------------------------- in this macro invocation
    |
help: this trait has no implementations, consider adding one
   --> palette/src/num.rs:234:1
    |
234 | pub trait Round {
    | ^^^^^^^^^^^^^^^
    = note: this error originates in the macro `impl_angle_float` (in Nightly builds, run with -Z macro-backtrace for more info)

Additional Details

I am trying to use palette on the thumbv6m-none-eabi target. I am trying to use palette to control the onboard RGB LED on a RP2040 Zero.

  • Cargo.toml entry: no changes
  • Rust version(s): cargo 1.82.0-nightly (2f738d617 2024-08-13) and cargo 1.80.1 (376290515 2024-07-16)
  • Target platform: x86_64-unknown-linux-gnu and thumbv6m-none-eabi

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRelated to things like README or the API documentation.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions