1 | [package] |
2 | name = "zbus" |
3 | version = "4.4.0" |
4 | authors = ["Zeeshan Ali Khan <zeeshanak@gnome.org>" ] |
5 | edition = "2021" |
6 | rust-version = "1.75" |
7 | |
8 | description = "API for D-Bus communication" |
9 | repository = "https://github.com/dbus2/zbus/" |
10 | keywords = ["D-Bus" , "DBus" , "IPC" ] |
11 | license = "MIT" |
12 | categories = ["os::unix-apis" ] |
13 | readme = "README.md" |
14 | |
15 | [features] |
16 | default = ["async-io" ] |
17 | uuid = ["zvariant/uuid" ] |
18 | url = ["zvariant/url" ] |
19 | time = ["zvariant/time" ] |
20 | chrono = ["zvariant/chrono" ] |
21 | heapless = ["zvariant/heapless" ] |
22 | # Enables ser/de of `Option<T>` as an array of 0 or 1 elements. |
23 | option-as-array = ["zvariant/option-as-array" ] |
24 | # Enables API that is only needed for bus implementations (enables `p2p`). |
25 | bus-impl = ["p2p" ] |
26 | # Enables API that is only needed for peer-to-peer (p2p) connections. |
27 | p2p = [] |
28 | async-io = [ |
29 | "dep:async-io" , |
30 | "async-executor" , |
31 | "async-task" , |
32 | "async-lock" , |
33 | "async-fs" , |
34 | "blocking" , |
35 | "futures-util/io" , |
36 | ] |
37 | tokio = ["dep:tokio" ] |
38 | vsock = ["dep:vsock" , "dep:async-io" ] |
39 | tokio-vsock = ["dep:tokio-vsock" , "tokio" ] |
40 | |
41 | [dependencies] |
42 | serde = { version = "1.0.200" , features = ["derive" ] } |
43 | serde_repr = "0.1.19" |
44 | zvariant = { path = "../zvariant" , version = "4.2.0" , default-features = false, features = [ |
45 | "enumflags2" , |
46 | ] } |
47 | zbus_names = { path = "../zbus_names" , version = "3.0" } |
48 | zbus_macros = { path = "../zbus_macros" , version = "=4.4.0" } |
49 | enumflags2 = { version = "0.7.9" , features = ["serde" ] } |
50 | async-io = { version = "2.3.2" , optional = true } |
51 | futures-core = "0.3.30" |
52 | futures-sink = "0.3.30" |
53 | futures-util = { version = "0.3.30" , default-features = false, features = [ |
54 | "sink" , |
55 | "std" , |
56 | ] } |
57 | async-lock = { version = "3.3.0" , optional = true } |
58 | async-broadcast = "0.7.0" |
59 | async-executor = { version = "1.11.0" , optional = true } |
60 | blocking = { version = "1.6.0" , optional = true } |
61 | async-task = { version = "4.7.1" , optional = true } |
62 | hex = "0.4.3" |
63 | ordered-stream = "0.2" |
64 | rand = "0.8.5" |
65 | sha1 = { version = "0.10.6" , features = ["std" ] } |
66 | event-listener = "5.3.0" |
67 | static_assertions = "1.1.0" |
68 | async-trait = "0.1.80" |
69 | async-fs = { version = "2.1.2" , optional = true } |
70 | # FIXME: We should only enable process feature for Mac OS. See comment on async-process below for why we can't. |
71 | tokio = { version = "1.37.0" , optional = true, features = [ |
72 | "rt" , |
73 | "net" , |
74 | "time" , |
75 | "fs" , |
76 | "io-util" , |
77 | "process" , |
78 | "sync" , |
79 | "tracing" , |
80 | ] } |
81 | tracing = "0.1.40" |
82 | vsock = { version = "0.5.0" , optional = true } |
83 | tokio-vsock = { version = "0.4" , optional = true } |
84 | xdg-home = "1.1.0" |
85 | |
86 | [target.'cfg(windows)'.dependencies] |
87 | windows-sys = { version = "0.52" , features = [ |
88 | "Win32_Foundation" , |
89 | "Win32_Security_Authorization" , |
90 | "Win32_System_Memory" , |
91 | "Win32_Networking" , |
92 | "Win32_Networking_WinSock" , |
93 | "Win32_NetworkManagement" , |
94 | "Win32_NetworkManagement_IpHelper" , |
95 | "Win32_System_Threading" , |
96 | ] } |
97 | uds_windows = "1.1.0" |
98 | |
99 | [target.'cfg(unix)'.dependencies] |
100 | nix = { version = "0.29" , default-features = false, features = [ |
101 | "socket" , |
102 | "uio" , |
103 | "user" , |
104 | ] } |
105 | |
106 | [target.'cfg(target_os = "macos")'.dependencies] |
107 | # FIXME: This should only be enabled if async-io feature is enabled but currently |
108 | # Cargo doesn't provide a way to do that for only specific target OS: https://github.com/rust-lang/cargo/issues/1197. |
109 | async-process = "2.2.2" |
110 | |
111 | [target.'cfg(any(target_os = "macos", windows))'.dependencies] |
112 | async-recursion = "1.1.1" |
113 | |
114 | [dev-dependencies] |
115 | zbus_xml = { path = "../zbus_xml" , version = "4.0.0" } |
116 | doc-comment = "0.3.3" |
117 | futures-util = "0.3.30" # activate default features |
118 | ntest = "0.9.2" |
119 | test-log = { version = "0.2.16" , features = [ |
120 | "trace" , |
121 | ], default-features = false } |
122 | tokio = { version = "1.37.0" , features = [ |
123 | "macros" , |
124 | "rt-multi-thread" , |
125 | "fs" , |
126 | "io-util" , |
127 | "net" , |
128 | "sync" , |
129 | ] } |
130 | tracing-subscriber = { version = "0.3.18" , features = [ |
131 | "env-filter" , |
132 | "fmt" , |
133 | "ansi" , |
134 | ], default-features = false } |
135 | tempfile = "3.10.1" |
136 | |
137 | [package.metadata.docs.rs] |
138 | all-features = true |
139 | targets = ["x86_64-unknown-linux-gnu" ] |
140 | |