1[package]
2name = "bumble"
3description = "Rust API for the Bumble Bluetooth stack"
4version = "0.2.0"
5edition = "2021"
6license = "Apache-2.0"
7homepage = "https://google.github.io/bumble/index.html"
8repository = "https://github.com/google/bumble"
9documentation = "https://docs.rs/crate/bumble"
10authors = ["Marshall Pierce <[email protected]>"]
11keywords = ["bluetooth", "ble"]
12categories = ["api-bindings", "network-programming"]
13rust-version = "1.76.0"
14
15# https://github.com/frewsxcv/cargo-all-features#options
16[package.metadata.cargo-all-features]
17# We are interested in testing subset combinations of this feature, so this is redundant
18denylist = ["unstable"]
19# To exercise combinations of any of these features, remove from `always_include_features`
20always_include_features = ["anyhow", "pyo3-asyncio-attributes", "dev-tools", "bumble-tools"]
21
22[dependencies]
23pyo3 = { version = "0.18.3", features = ["macros"] }
24pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime"] }
25tokio = { version = "1.28.2", features = ["macros", "signal"] }
26nom = "7.1.3"
27strum = "0.25.0"
28strum_macros = "0.25.0"
29hex = "0.4.3"
30itertools = "0.11.0"
31lazy_static = "1.4.0"
32thiserror = "1.0.41"
33bytes = "1.5.0"
34pdl-derive = "0.2.0"
35pdl-runtime = "0.2.0"
36futures = "0.3.28"
37
38# Dev tools
39file-header = { version = "0.1.2", optional = true }
40globset = { version = "0.4.13", optional = true }
41
42# CLI
43anyhow = { version = "1.0.71", optional = true }
44clap = { version = "4.3.3", features = ["derive"], optional = true }
45directories = { version = "5.0.1", optional = true }
46env_logger = { version = "0.10.0", optional = true }
47log = { version = "0.4.19", optional = true }
48owo-colors = { version = "3.5.0", optional = true }
49reqwest = { version = "0.11.20", features = ["blocking"], optional = true }
50rusb = { version = "0.9.2", optional = true }
51
52[dev-dependencies]
53tokio = { version = "1.28.2", features = ["full"] }
54tempfile = "3.6.0"
55nix = "0.26.2"
56anyhow = "1.0.71"
57pyo3 = { version = "0.18.3", features = ["macros", "anyhow"] }
58pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime", "attributes", "testing"] }
59rusb = "0.9.2"
60rand = "0.8.5"
61clap = { version = "4.3.3", features = ["derive"] }
62owo-colors = "3.5.0"
63log = "0.4.19"
64env_logger = "0.10.0"
65
66[package.metadata.docs.rs]
67rustdoc-args = ["--generate-link-to-definition"]
68
69[[bin]]
70name = "file-header"
71path = "tools/file_header.rs"
72required-features = ["dev-tools"]
73
74[[bin]]
75name = "gen-assigned-numbers"
76path = "tools/gen_assigned_numbers.rs"
77required-features = ["dev-tools"]
78
79[[bin]]
80name = "bumble"
81path = "src/main.rs"
82required-features = ["bumble-tools"]
83
84[[example]]
85name = "broadcast"
86path = "examples/broadcast.rs"
87required-features = ["unstable_extended_adv"]
88
89# test entry point that uses pyo3_asyncio's test harness
90[[test]]
91name = "pytests"
92path = "pytests/pytests.rs"
93harness = false
94
95[features]
96anyhow = ["pyo3/anyhow"]
97pyo3-asyncio-attributes = ["pyo3-asyncio/attributes"]
98dev-tools = ["dep:anyhow", "dep:clap", "dep:file-header", "dep:globset"]
99# separate feature for CLI so that dependencies don't spend time building these
100bumble-tools = ["dep:clap", "anyhow", "dep:anyhow", "dep:directories", "pyo3-asyncio-attributes", "dep:owo-colors", "dep:reqwest", "dep:rusb", "dep:log", "dep:env_logger"]
101
102# all the unstable features
103unstable = ["unstable_extended_adv"]
104unstable_extended_adv = []
105
106default = []
107