Skip to content

cpufeatures: use is_*_feature_detected! on targets with std? #1534

Description

@newpavlov

Sadly, the only popular target arch where a proper no_std target feature detection is available is x86(-64). For other targets we use OS-specific detection code.

Targets with OS generally have std, so we could use is_*_feature_detected! macros on them instead of re-implementing OS-specific target feature detection code. This would allow us to automatically support new target features with minimal maintenance burden.

I suggest we switch to the macros on selected targets with available std in the next breaking release.

One open question is whether we should use is_x86_feature_detected! on targets with OS or keep using our CPUID code.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions