Improving/simplifying `cfg` attributes for target features
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- rust
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 13
- Fork
- 4
- Merge medio
- 41m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di RustCrypto/meta
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
RustCrypto/meta#38 · 5 commenti ·
-
Proof systemAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
RustCrypto/meta#37 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
RustCrypto/meta#36 · 8 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
RustCrypto/meta#34 · 8 commenti ·
-
Replace `subtle` with `ctutils`?Forse di nuovo libera @newpavlov l’ha presa 323 giorni fa e non c’è nessuna pull request aperta. Aperta
RustCrypto/meta#29 · 1 commento · 1 assegnatario ·
Tutte le issue di RustCrypto/meta
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/kernels#1006 ·
I maintainer di solito rispondono entro 1 giorno
-
abin CI/CD need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
MarcelRoozekrans/Rag.NET#1030 ·
I maintainer di solito rispondono entro 1 giorno
-
vips-drift
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
Stirling-Tools/JPDFium#300 ·
I maintainer di solito rispondono entro 1 giorno
-
Pin and verify Security Insights schema in lintinsights targetForse già presa @imshubham22apr-gif l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
gemaraproj/gemara#618 ·
I maintainer di solito rispondono entro 2 giorni