Cargo Features

amplify = { version = "4.1.1", default-features = false, features = ["std", "alloc", "all", "apfloat_std", "apfloat_alloc", "c_raw", "hex", "apfloat", "proc_attr", "derive", "serde", "getrandom"] }
default = derive, hex, std

These default features are set whenever amplify is added without default-features = false somewhere in the dependency tree.

std default all? c_raw? serde? = alloc

Enables std of amplify_num

Affects confinement::TinyHashSet, confinement::SmallHashSet, confinement::MediumHashSet, confinement::LargeHashSet, confinement::NonEmptyHashSet, confinement::TinyHashMap, confinement::SmallHashMap, confinement::MediumHashMap, confinement::LargeHashMap, confinement::NonEmptyHashMap, collection::flags

alloc std

Enables alloc of amplify_num

Affects collection::confinement

all = apfloat, apfloat_std, c_raw, derive, parse_arg, proc_attr, rand, serde, std, stringly_conversions
apfloat_std all?

Enables std of amplify_apfloat


Enables alloc of amplify_apfloat

c_raw all? = libc, std
hex default

Enables hex of amplify_num

apfloat all? = amplify_apfloat
proc_attr all? = amplify_syn
derive default all? = amplify_derive
serde all? = serde_crate, serde_json, serde_yaml, std, stringly_conversions, toml

Enables alloc and serde_str_helpers of stringly_conversions, serde of amplify_num and ascii

Affects to_serde_string::ToYamlString, to_serde_string::ToJsonString, to_serde_string::ToTomlString

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

libc c_raw?

With default (std)

amplify_derive derive
amplify_syn proc_attr?
amplify_apfloat apfloat?

With default (std)

parse_arg all?
rand all?

With default features

serde_crate serde?

Enables derive and default (std) of serde

This strange naming is a workaround for not being able to define required features for a dependency See for the explanation and references.

serde_json serde?

With default (std)

serde_yaml serde?

Enables serde_yaml <=0.9.21

Fix for MSRV 0.60

toml serde?

Enables toml ^0.5

stringly_conversions all? serde?

With alloc

getrandom cfg(target_arch = "wasm32") implicit feature

With js