Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

[dependencies]
chacha20 = { version = "0.10.0", default-features = false, features = ["legacy", "rng", "xchacha", "zeroize"] }
default = cipher

The cipher feature is set by default whenever chacha20 is added without default-features = false somewhere in the dependency tree.

legacy = cipher

Affects variants::Legacy

rng

Enables rand_core

Affects variants::Legacy

xchacha = cipher

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.

cipher default legacy? xchacha?
zeroize implicit feature

Enables zeroize

zeroize is an explicit dependency because this crate may be used without the cipher crate