Cargo Features
[dependencies]
zbus = { version = "5.0.1", default-features = false, features = ["uuid", "url", "time", "chrono", "heapless", "option-as-array", "camino", "bus-impl", "p2p", "async-io", "tokio", "vsock", "tokio-vsock", "blocking-api", "serde_bytes"] }
- default = async-io, blocking-api
-
These default features are set whenever
zbus
is added without
somewhere in the dependency tree.default-features = false - uuid
- url
- time
- chrono
- heapless
- option-as-array
-
Enables ser/de of
Option<T>
as an array of 0 or 1 elements.Enables option-as-array of zvariant
- camino
- bus-impl = p2p
-
Enables API that is only needed for bus implementations (enables
p2p
). - p2p bus-impl?
-
Enables API that is only needed for peer-to-peer (p2p) connections.
Enables rand
Affects
socket::channel
… - async-io default = async-executor, async-fs, async-lock, async-task, blocking
-
Enables async-io
Optional and target-specific dependencies.
and io of futures-util
activate default features
- tokio tokio-vsock?
-
Enables tokio
FIXME: We should only enable process feature for Mac OS. See comment on async-process below for why we can't.
Affects
executor::Executor
,executor::Task
,utils::block_on
… - vsock
- tokio-vsock = tokio
-
Enables tokio-vsock
- blocking-api default
-
Enable blocking API (default).
Enables blocking-api of zbus_macros
Affects
zbus::blocking
… - serde_bytes
-
Enable
serde_bytes
feature ofzvariant
.Enables serde_bytes of zvariant
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.