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 default-features = false somewhere in the dependency tree.

uuid

Enables uuid of zvariant

url

Enables url of zvariant

time

Enables time of zvariant

chrono

Enables chrono of zvariant

heapless

Enables heapless of zvariant

option-as-array

Enables ser/de of Option<T> as an array of 0 or 1 elements.

Enables option-as-array of zvariant

camino

Enables camino of zvariant

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

Enables async-io and 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 of zvariant.

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.

async-lock async-io
async-executor async-io
blocking async-io
async-task async-io
async-fs async-io