[package]
edition = "2024"
name = "btleplug"
version = "0.12.0"
authors = ["Nonpolynomial, LLC <kyle@nonpolynomial.com>"]
build = false
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"
[[test]]
name = "test_advertisement_manufacturer_data"
path = "tests/test_advertisement_manufacturer_data.rs"
[[test]]
name = "test_advertisement_services"
path = "tests/test_advertisement_services.rs"
[[test]]
name = "test_characteristic_properties"
path = "tests/test_characteristic_properties.rs"
[[test]]
name = "test_configurable_notification_payload"
path = "tests/test_configurable_notification_payload.rs"
[[test]]
name = "test_connect_and_disconnect"
path = "tests/test_connect_and_disconnect.rs"
[[test]]
name = "test_connection_parameters"
path = "tests/test_connection_parameters.rs"
[[test]]
name = "test_descriptor_discovery"
path = "tests/test_descriptor_discovery.rs"
[[test]]
name = "test_discover_characteristics"
path = "tests/test_discover_characteristics.rs"
[[test]]
name = "test_discover_peripheral_by_name"
path = "tests/test_discover_peripheral_by_name.rs"
[[test]]
name = "test_discover_services"
path = "tests/test_discover_services.rs"
[[test]]
name = "test_long_value_read_write"
path = "tests/test_long_value_read_write.rs"
[[test]]
name = "test_mtu_after_connection"
path = "tests/test_mtu_after_connection.rs"
[[test]]
name = "test_peripheral_triggered_disconnect"
path = "tests/test_peripheral_triggered_disconnect.rs"
[[test]]
name = "test_properties_contain_peripheral_info"
path = "tests/test_properties_contain_peripheral_info.rs"
[[test]]
name = "test_read_counter_increments"
path = "tests/test_read_counter_increments.rs"
[[test]]
name = "test_read_only_descriptor"
path = "tests/test_read_only_descriptor.rs"
[[test]]
name = "test_read_rssi"
path = "tests/test_read_rssi.rs"
[[test]]
name = "test_read_static_value"
path = "tests/test_read_static_value.rs"
[[test]]
name = "test_read_write_descriptor_roundtrip"
path = "tests/test_read_write_descriptor_roundtrip.rs"
[[test]]
name = "test_read_write_roundtrip"
path = "tests/test_read_write_roundtrip.rs"
[[test]]
name = "test_reconnect_after_disconnect"
path = "tests/test_reconnect_after_disconnect.rs"
[[test]]
name = "test_request_connection_parameters"
path = "tests/test_request_connection_parameters.rs"
[[test]]
name = "test_scan_filter_by_service_uuid"
path = "tests/test_scan_filter_by_service_uuid.rs"
[[test]]
name = "test_subscribe_and_receive_indications"
path = "tests/test_subscribe_and_receive_indications.rs"
[[test]]
name = "test_subscribe_and_receive_notifications"
path = "tests/test_subscribe_and_receive_notifications.rs"
[[test]]
name = "test_unsubscribe_stops_notifications"
path = "tests/test_unsubscribe_stops_notifications.rs"
[[test]]
name = "test_write_with_response"
path = "tests/test_write_with_response.rs"
[[test]]
name = "test_write_without_response"
path = "tests/test_write_without_response.rs"
[[test]]
name = "test_write_without_response_burst"
path = "tests/test_write_without_response_burst.rs"
[dependencies.async-trait]
version = "0.1.89"
[dependencies.bitflags]
version = "2.11.0"
[dependencies.dashmap]
version = "6.1.0"
[dependencies.futures]
version = "0.3.32"
[dependencies.log]
version = "0.4.29"
[dependencies.serde_bytes]
version = "0.11.19"
optional = true
[dependencies.serde_cr]
version = "1.0.228"
features = ["derive"]
optional = true
default-features = false
package = "serde"
[dependencies.static_assertions]
version = "1.1.0"
[dependencies.thiserror]
version = "2.0.18"
[dependencies.tokio]
version = "1.50.0"
features = [
"sync",
"rt",
"time",
]
[dependencies.tokio-stream]
version = "0.1.18"
features = ["sync"]
[dependencies.uuid]
version = "1.22.0"
[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.149"
[dev-dependencies.tokio]
version = "1.50.0"
features = [
"macros",
"rt",
"rt-multi-thread",
]
[dev-dependencies.toml]
version = "1.0.6"
[target.'cfg(not(target_os = "android"))'.dependencies.jni]
version = "0.19.0"
optional = true
[target.'cfg(not(target_os = "android"))'.dependencies.once_cell]
version = "1.21.3"
optional = true
[target.'cfg(target_os = "android")'.dependencies.jni]
version = "0.19.0"
[target.'cfg(target_os = "android")'.dependencies.once_cell]
version = "1.21.3"
[target.'cfg(target_os = "linux")'.dependencies.bluez-async]
version = "0.8.2"
[target.'cfg(target_os = "linux")'.dependencies.dbus]
version = "0.9.10"
[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.62"
features = [
"Devices_Bluetooth",
"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.5.2"
[target.'cfg(target_vendor = "apple")'.dependencies.objc2-core-bluetooth]
version = "0.2.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.2.2"
features = [
"std",
"block2",
"NSArray",
"NSData",
"NSDictionary",
"NSEnumerator",
"NSError",
"NSObject",
"NSString",
"NSUUID",
"NSValue",
]
default-features = false