Improving/simplifying `cfg` attributes for target features
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- rust
- 領域
- build-system
研究方向
Start by reading the existing cfg attributes described in the issue and the build scripts that could propagate a global attribute across the RustCrypto crates. The issue offers alternative naming schemes but does not settle the design or identify specific files. Done means choosing and implementing a consistent way to select backends and enable target architecture support across crates.
由索引模型根據 Issue 內容生成。
描述
After many issues using crate features for controlling usage of target features, we've largely migrated to using cfg attributes instead.
Here are some of the cfg attributes we've defined:
aes_force_soft: use the software AES backendaes_armv8: enable ARMv8 AES intrinsics (nightly-only)chacha20_force_avx2: force the use of the AVX2 backend for ChaCha20chacha20_force_sse2: force the use of the SSE2 backend for ChaCha20chacha20_force_soft: force the use of the software-only backend for ChaCha20polyval_force_soft: use the software POLYVAL backendpolyval_armv8: enable ARMv8 PMULL intrinsics (nightly-only)
First off, these all are selecting one of many options and are mutually exclusive at a crate level. cfg attributes make that possible in ways crate features don.t Alternatively we could have:
aes_backend="armv8",aes_backend="soft"chacha20_backend="avx2",chacha20_backend="sse2",chacha20_backend="soft",polyval_backend="armv8",polyval_backend="soft"
This would both be consistent across crates and simplify the logic in regard to conflicting attributes.
However, it would also be nice to have some way of enabling e.g. ARMv8 support without having to know about every subcomponent crate and whether or not it has ARMv8-specific features.
For example, right now to have fully hardware accelerated AES-GCM on ARMv8, an aes-gcm crate user needs to enable the aes_armv8 and polyval_armv8 cfg attributes.
It would be nice if there were a single cfg attribute that could be used to enable this across the whole project, e.g.
rustcrypto_target_arch="armv8"
To make this a bit easier to implement, we can continue to use the crate-specific attributes as the canonical cfg attributes, and use a build script to propagate the "global" cfg attributes.
- 主要語言
- 沒有語言資料
- 星號
- 13
- 分支
- 4
- 平均合併
- 41 分鐘
- 30 天內合併 PR
- 1
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
RustCrypto/meta 的其他 Issue
-
難度 5/5 一週以上 新手友好度 25/100
RustCrypto/meta#38 · 5 則留言 ·
-
Proof system未關閉
難度 5/5 一週以上 新手友好度 20/100
RustCrypto/meta#37 · 3 則留言 ·
-
難度 4/5 3-5 天 新手友好度 35/100
RustCrypto/meta#36 · 8 則留言 ·
-
難度 4/5 3-5 天 新手友好度 32/100
RustCrypto/meta#34 · 8 則留言 ·
-
Replace `subtle` with `ctutils`?可能重新可做 @newpavlov 於 323 天前認領,目前沒有進行中的 PR。 未關閉
RustCrypto/meta#29 · 1 則留言 · 已指派 1 人 ·
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
huggingface/kernels#1006 ·
維護者通常 1 天內回覆
-
abin CI/CD need-triage
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
MarcelRoozekrans/Rag.NET#1030 ·
維護者通常 1 天內回覆
-
vips-drift
難度 2/5 1-3 小時 新手友好度 74/100
Stirling-Tools/JPDFium#300 ·
維護者通常 1 天內回覆
-
Pin and verify Security Insights schema in lintinsights target可能已有人在做 @imshubham22apr-gif 於 5 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
gemaraproj/gemara#618 ·
維護者通常 2 天內回覆