Cargo Features

[dependencies]
mongodb = { version = "3.1.0", default-features = false, features = ["compat-3-0-0", "sync", "rustls-tls", "openssl-tls", "dns-resolver", "aws-auth", "azure-kms", "azure-oidc", "gcp-oidc", "gcp-kms", "zstd-compression", "zlib-compression", "snappy-compression", "in-use-encryption-unstable", "tracing-unstable"] }
default = compat-3-0-0, dns-resolver, rustls-tls

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

compat-3-0-0 default
sync

Affects mongodb::sync

rustls-tls default

Enables rustls ^0.21.6, rustls-pemfile ^1.0.1, and tokio-rustls ^0.24.1

openssl-tls

Enables openssl, openssl-probe, and tokio-openssl

Affects options::TlsOptions.allow_invalid_hostnames

dns-resolver default

Enables hickory-proto and hickory-resolver

aws-auth

Enable support for MONGODB-AWS authentication.
This can only be used with the tokio-runtime feature flag.

Enables reqwest ^0.11.2

azure-kms

Enable support for on-demand Azure KMS credentials.
This can only be used with the tokio-runtime feature flag.

Enables reqwest ^0.11.2

azure-oidc

Enable support for azure OIDC authentication.

Enables reqwest ^0.11.2

gcp-oidc

Enable support for gcp OIDC authentication.

Enables reqwest ^0.11.2

gcp-kms

Enable support for on-demand GCP KMS credentials.
This can only be used with the tokio-runtime feature flag.

Enables reqwest ^0.11.2

zstd-compression

Enables zstd ^0.11.2

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

zlib-compression

Enables flate2

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

snappy-compression

Enables snap

Affects options::ClientOptions.compressors, options::ConnectionString.compressors

in-use-encryption-unstable

Enables support for client-side field level encryption and queryable encryption.
The In Use Encryption API is unstable and may have backwards-incompatible changes in minor version updates.

Enables mongocrypt, num_cpus, and rayon

Affects action::csfle, options::DropCollectionOptions.encrypted_fields, options::CreateCollectionOptions.encrypted_fields

tracing-unstable

Enables support for emitting tracing events. The tracing API is unstable and may have backwards-incompatible changes in minor version updates. TODO: pending https://github.com/tokio-rs/tracing/issues/2036 stop depending directly on log.

Enables log and tracing

Affects options::ClientOptions.tracing_max_document_length_bytes