Cargo Features
[dependencies]
futures-util = { version = "0.3.31", default-features = false, features = ["std", "alloc", "async-await", "async-await-macro", "compat", "io-compat", "sink", "io", "channel", "portable-atomic", "unstable", "bilock", "write-all-vectored", "cfg-target-has-atomic"] }
- default = async-await, async-await-macro, std
-
These default features are set whenever
futures-util
is added without
somewhere in the dependency tree.default-features = false - std default channel? compat? io? = alloc, slab
-
Enables std of futures-core and futures-task
Affects
future::FutureExt.catch_unwind
,future::FutureExt.shared
,stream::StreamExt.catch_unwind
,future::FutureExt.remote_handle
,futures-util::io
,try_stream::TryStreamExt.into_async_read
,spawn::SpawnExt.spawn_with_handle
,spawn::LocalSpawnExt.spawn_local_with_handle
… - alloc std
-
Enables alloc of futures-core and futures-task
Affects
future::FutureExt.boxed
,future::FutureExt.boxed_local
,futures-util::lock
,sink::SinkExt.buffer
,stream::futures_unordered
,stream::select_all
,stream::StreamExt.flatten_unordered
,stream::StreamExt.flat_map_unordered
,stream::StreamExt.for_each_concurrent
,stream::StreamExt.boxed
,stream::StreamExt.boxed_local
,stream::StreamExt.buffered
,stream::StreamExt.buffer_unordered
,stream::StreamExt.chunks
,stream::StreamExt.ready_chunks
,try_stream::TryStreamExt.try_for_each_concurrent
,try_stream::TryStreamExt.try_chunks
,try_stream::TryStreamExt.try_ready_chunks
,try_stream::TryStreamExt.try_flatten_unordered
,try_stream::TryStreamExt.try_buffer_unordered
… - async-await default async-await-macro
- async-await-macro default = async-await, futures-macro
- compat io-compat? = futures_01, std
-
Affects
try_future::TryFutureExt.compat
,futures-util::compat
,sink::SinkExt.compat
,try_stream::TryStreamExt.compat
,spawn::SpawnExt.compat
… - io-compat = compat, io, tokio-io
-
Affects
io::AsyncReadExt.compat
,io::AsyncWriteExt.compat_write
… - sink = futures-sink
-
Affects
compat01as03::Sink01CompatExt
,compat01as03::Compat01As03Sink
,compat03as01::CompatSink
,try_future::TryFutureExt.flatten_sink
,io::AsyncWriteExt.into_sink
,futures-util::sink
,stream::StreamExt.forward
,stream::StreamExt.split
… - io io-compat? write-all-vectored? = futures-io, memchr, std
-
Affects
futures-util::io
,try_stream::TryStreamExt.into_async_read
… - channel = futures-channel, std
-
Affects
future::FutureExt.remote_handle
,spawn::SpawnExt.spawn_with_handle
,spawn::LocalSpawnExt.spawn_local_with_handle
… - portable-atomic
-
Enables portable-atomic of futures-core
- 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-core and futures-task
- bilock
-
Affects
bilock::BiLockAcquire
… - write-all-vectored = io
-
Affects
io::AsyncWriteExt.write_all_vectored
… - 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.