Cargo Features

async-nats = { version = "0.35.1", default-features = false, features = ["service", "aws-lc-rs", "ring", "fips", "experimental", "server_2_10", "slow_tests", "compatibility_tests"] }
default = ring, server_2_10

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

service experimental?

Enables Service API for the client.

Affects async-nats::service

aws-lc-rs fips?

Enables aws-lc-rs and aws-lc-rs of tokio-rustls


Alias because Cargo features commonly use -

ring default

Enables ring, ring of tokio-rustls

fips = aws-lc-rs

Enables fips of tokio-rustls

experimental = service

All experimental features are part of this feature flag.

server_2_10 default

Features that require nats-server version 2.10 or higher.
It is enabled by default since official 2.10 nats-server release.

Affects consumer::Config.filter_subjects, consumer::Config.metadata, pull::OrderedConfig.filter_subjects, pull::OrderedConfig.metadata, pull::Config.filter_subjects, pull::Config.metadata, push::Config.filter_subjects, push::Config.metadata, push::OrderedConfig.filter_subjects, push::OrderedConfig.metadata, kv::Config.compression, stream::Config.metadata, stream::Config.subject_transform, stream::Config.compression, stream::Config.consumer_limits, stream::Config.first_sequence, stream::Source.subject_transforms


Used for enabling/disabling tests that by design take a lot of time to complete.
Those tests are usually used for time-sensitive checks, like consumer heartbeats, longer timeouts, etc.


Used for tests that ensure compatibility across client libraries in APIs that are abstraction layer build on top of NATS server features (Service API, KV, Object Store etc.)