Cargo Features

[dependencies]
alloy-primitives = { version = "0.7.2", default-features = false, features = ["std", "native-keccak", "asm-keccak", "postgres", "getrandom", "rand", "rlp", "serde", "ssz", "k256", "allocative", "arbitrary", "hex-compat"] }
default = std

The std feature is set by default whenever alloy-primitives is added without default-features = false somewhere in the dependency tree.

std default arbitrary? postgres? ssz?

Enables std of optional alloy-rlp, bytes, const-hex, optional k256, optional keccak-asm, optional proptest, optional rand, ruint, and optional serde

alloy-rlp:

rlp

tiny-keccak native-keccak
asm-keccak

Enables keccak-asm

postgres = std

Enables postgres-types, postgres of ruint

Affects alloy-primitives::postgres

getrandom rand?

Enables getrandom

rand = getrandom

Enables rand, rand of ruint

rlp

Enables alloy-rlp and alloy-rlp of ruint

ruint:

support

serde

Enables serde and serde of bytes, const-hex, and ruint

const-hex:

Serde support. Use with #[serde(with = "const_hex")].

ssz = std

Enables ethereum_ssz, ssz of ruint

k256

Enables k256

Affects alloy-primitives::Signature

allocative

Enables allocative

arbitrary = std

Enables arbitrary and derive_arbitrary, proptest and proptest-derive, arbitrary and proptest of ruint and arbitrary of optional ethereum_ssz

ssz

hex-compat

const-hex compatibility feature for hex. Should not be needed most of the time.

Enables hex of const-hex