Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#1,534 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

先阅读 cpufeatures 的目标检测实现以及所引用的 is_*_feature_detected! 宏。比较基于宏的方法和 CPUID 方法在 OS 目标上的差异,包括尚未解决的 x86 问题。当选定目标确定了适用于下一次 breaking release 的一致检测策略,并且新增目标特性所需的维护工作更少时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Rust
星标
674
派生
170
平均合并
1 天 12 小时
30 天内合并 PR
10

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RustCrypto/utils 的其他 Issue

查看 RustCrypto/utils 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。