[package]
edition = "2024"
name = "btleplug"
version = "0.13.4"
authors = ["Nonpolynomial, LLC <kyle@nonpolynomial.com>"]
build = false
include = [
"src/**",
"examples/**",
"/README.md",
"/CHANGELOG.md",
"/LICENSE.md",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
A Cross-Platform Rust Bluetooth Low Energy (BLE) GATT
library.
"""
homepage = "https://github.com/deviceplug/btleplug"
readme = "README.md"
keywords = [
"bluetooth",
"BLE",
"bluez",
"uwp",
"corebluetooth",
]
categories = ["hardware-support"]
license = "MIT/Apache-2.0/BSD-3-Clause"
repository = "https://github.com/deviceplug/btleplug"
[features]
jni-host-tests = [
"jni/invocation",
"once_cell",
]
serde = [
"uuid/serde",
"serde_cr",
"serde_bytes",
]
[lib]
name = "btleplug"
path = "src/lib.rs"
[[example]]
name = "discover_adapters_peripherals"
path = "examples/discover_adapters_peripherals.rs"
[[example]]
name = "event_driven_discovery"
path = "examples/event_driven_discovery.rs"
[[example]]
name = "lights"
path = "examples/lights.rs"
[[example]]
name = "subscribe_notify_characteristic"
path = "examples/subscribe_notify_characteristic.rs"
[dependencies.async-trait]
version = "0.1.92"
[dependencies.bitflags]
version = "2.13.2"
[dependencies.dashmap]
version = "6.2.1"
[dependencies.futures]
version = "0.3.34"
[dependencies.log]
version = "0.4.34"
[dependencies.serde_bytes]
version = "0.11.19"
optional = true
[dependencies.serde_cr]
version = "1.0.229"
features = ["derive"]
optional = true
default-features = false
package = "serde"
[dependencies.static_assertions]
version = "1.1.0"
[dependencies.thiserror]
version = "2.0.20"
[dependencies.tokio]
version = "1.53.1"
features = [
"sync",
"rt",
"time",
]
[dependencies.tokio-stream]
version = "0.1.19"
features = ["sync"]
[dependencies.uuid]
version = "1.26.1"
[dev-dependencies.anyhow]
version = "1"
[dev-dependencies.lazy_static]
version = "1.5.0"
[dev-dependencies.pretty_env_logger]
version = "0.5.0"
[dev-dependencies.rand]
version = "0.10"
[dev-dependencies.serde_json]
version = "1.0.151"
[dev-dependencies.tokio]
version = "1.53.1"
features = [
"macros",
"rt",
"rt-multi-thread",
]
[dev-dependencies.toml]
version = "1.1.6"
[target.'cfg(not(target_os = "android"))'.dependencies.jni]
version = "0.22"
optional = true
[target.'cfg(not(target_os = "android"))'.dependencies.once_cell]
version = "1.21.4"
optional = true
[target.'cfg(target_os = "android")'.dependencies.jni]
version = "0.22"
[target.'cfg(target_os = "android")'.dependencies.once_cell]
version = "1.21.4"
[target.'cfg(target_os = "linux")'.dependencies.bluez-async]
version = "0.8.2"
[target.'cfg(target_os = "linux")'.dependencies.dbus]
version = "0.9.12"
[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.62"
features = [
"Devices_Bluetooth",
"Devices_Enumeration",
"Devices_Bluetooth_GenericAttributeProfile",
"Devices_Bluetooth_Advertisement",
"Devices_Radios",
"Foundation_Collections",
"Foundation",
"Storage_Streams",
]
[target.'cfg(target_os = "windows")'.dependencies.windows-future]
version = "0.3.2"
[target.'cfg(target_vendor = "apple")'.dependencies.objc2]
version = "0.6.4"
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-core-bluetooth]
version = "0.3.2"
features = [
"std",
"CBAdvertisementData",
"CBAttribute",
"CBCentralManager",
"CBCentralManagerConstants",
"CBCharacteristic",
"CBDescriptor",
"CBManager",
"CBPeer",
"CBPeripheral",
"CBService",
"CBUUID",
]
default-features = false
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-foundation]
version = "0.3.2"
features = [
"std",
"block2",
"NSArray",
"NSData",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSObject",
"NSString",
"NSUUID",
"NSValue",
]
default-features = false