Cargo Features
[dependencies]
sm2 = { version = "0.13.3", default-features = false, features = ["std", "alloc", "arithmetic", "dsa", "getrandom", "pem", "pkcs8", "serde"] }
- default = arithmetic, dsa, pem, std
-
These default features are set whenever
sm2
is added without
somewhere in the dependency tree.default-features = false - std default = alloc
-
Enables std of elliptic-curve and optional signature
- alloc std
-
Enables alloc of elliptic-curve
- arithmetic default dsa
-
Enables arithmetic of elliptic-curve and primeorder
optional dependencies
Affects
sm2::NonZeroScalar
,sm2::PublicKey
… - dsa default = arithmetic
-
Enables rfc6979, signature, and sm3
Affects
sm2::dsa
… - getrandom dev
-
Enables rand_core
- pem default = pkcs8
-
Enables pem of elliptic-curve
- pkcs8 pem
-
Enables pkcs8 of elliptic-curve
- serde = serdect
-
Enables serde of elliptic-curve and optional primeorder
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.