Cargo Features
[dependencies]
sm2 = { version = "0.14.0-rc.7", default-features = false, features = ["std", "alloc", "arithmetic", "bits", "dsa", "getrandom", "pke", "pem", "pkcs8", "serde"] }
- default = arithmetic, dsa, getrandom, pem, pke, std
-
These default features are set whenever
sm2is added withoutsomewhere in the dependency tree.default-features = false - std default = alloc
-
Enables std of elliptic-curve
- alloc pke std
-
Enables alloc of elliptic-curve
- arithmetic default bits? dsa pke
-
Enables primefield and primeorder, arithmetic of elliptic-curve
Affects
sm2::NonZeroScalar,sm2::PublicKey… - bits = arithmetic
-
Enables bits of elliptic-curve
Affects
sm2::ScalarBits… - dsa default = arithmetic
-
Enables rfc6979, signature, and sm3
Affects
sm2::dsa… - getrandom default
-
Enables getrandom of elliptic-curve
- pke default = alloc, arithmetic, pkcs8
-
Enables sm3
Affects
sm2::pke… - pem default = pkcs8
-
Enables pem of elliptic-curve
- pkcs8 pem pke = der
-
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.