Cargo Features
[dependencies]
futures = { version = "0.3.31", default-features = false, features = ["std", "alloc", "async-await", "compat", "io-compat", "executor", "thread-pool", "unstable", "bilock", "write-all-vectored", "cfg-target-has-atomic"] }
- default = async-await, executor, std
-
These default features are set whenever
futures
is added without
somewhere in the dependency tree.default-features = false - std default compat? executor = alloc
-
Enables channel, io and std of futures-util, std of futures-core, futures-io, futures-sink, and futures-task
- alloc std
-
Enables alloc of futures-channel, futures-core, futures-sink, futures-task, and futures-util
- async-await default
-
Enables async-await and async-await-macro of futures-util
- compat io-compat? = std
-
Enables compat of futures-util
Affects
futures::compat
… - io-compat = compat
-
Enables io-compat of futures-util
- executor default thread-pool? = std
-
Enables std of futures-executor
Affects
futures::executor
… - thread-pool = executor
-
Enables thread-pool of futures-executor
- unstable
-
Unstable features These features are outside of the normal semver guarantees and require the
unstable
feature as an explicit opt-in to unstable API.Enables unstable of futures-channel, futures-core, futures-io, futures-task, and futures-util
- bilock
-
Enables bilock of futures-util
- write-all-vectored
-
Enables write-all-vectored of futures-util
- cfg-target-has-atomic
-
These features are no longer used.
TODO: remove in the next major version.
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.