Cargo Features

[dependencies]
bcrypt = { version = "0.16.0", default-features = false, features = ["std", "alloc", "js", "zeroize"] }
default = std, zeroize

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

std default

Enables std of base64 and getrandom

getrandom:

Implement std-only traits for getrandom::Error

Affects bcrypt::HashParts, bcrypt::hash, bcrypt::non_truncating_hash, bcrypt::hash_with_result, bcrypt::non_truncating_hash_with_result, bcrypt::hash_with_salt, bcrypt::non_truncating_hash_with_salt, bcrypt::verify, bcrypt::non_truncating_verify

alloc = getrandom

Enables alloc of base64

Affects bcrypt::HashParts, bcrypt::hash, bcrypt::non_truncating_hash, bcrypt::hash_with_result, bcrypt::non_truncating_hash_with_result, bcrypt::hash_with_salt, bcrypt::non_truncating_hash_with_salt, bcrypt::verify, bcrypt::non_truncating_verify

js

Enables js of getrandom

getrandom:

Feature to enable JavaScript bindings on wasm*-unknown-unknown

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.

getrandom alloc? js? std
zeroize default