Cargo Features
[dependencies]
async-nats = { version = "0.38.0", default-features = false, features = ["service", "websockets", "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
somewhere in the dependency tree.default-features = false - service experimental?
-
Enables Service API for the client.
Affects
async-nats::service
… - websockets
-
Enables tokio-websockets
- aws-lc-rs fips?
-
Enables aws-lc-rs and aws-lc-rs of tokio-rustls and tokio-websockets
tokio-rustls:
Alias because Cargo features commonly use
-
- ring default
-
Enables ring, ring of tokio-rustls and tokio-websockets
- 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
… - slow_tests
-
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. - compatibility_tests
-
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.)