Packages
Elixir library providing Bluetooth Low Energy (BLE) client functionality through a Rustler NIF. Uses the btleplug crate to scan for, connect to, and interact with BLE peripherals. POC basic functionality and only client (central) mode is supported resp. usable currently.
Current section
Files
Jump to
Current section
Files
native/btleplug_client/Cargo.toml
[package]
name = "btleplug_client"
version = "0.0.1-alpha"
keywords = ["bluetooth", "BLE", "bluez", "uwp", "corebluetooth"]
categories = ["hardware-support"]
edition = "2021"
[lib]
name = "btleplug_client"
path = "src/lib.rs"
crate-type = ["cdylib"]
[features]
default = ["nif_version_2_15"]
nif_version_2_15 = ["rustler/nif_version_2_15"]
nif_version_2_16 = ["rustler/nif_version_2_16"]
nif_version_2_17 = ["rustler/nif_version_2_17"]
[build-dependencies]
rustc_version = "0.4"
[dependencies]
uuid = "1.14.0"
log = "0.4.22"
# env_logger = "0.11"
pretty_env_logger = "0.5.0"
atty = "0.2.4"
chrono = "0.4.3"
# { git = "https://github.com/uuid-rs/uuid.git", branch = "main" } # "1.4" #{ version = "1.4", features = ["serde"] }
btleplug = { version = "0.11.7", features = ["serde"] }
#bluster = {git = "https://github.com/adiibanez/bluster", branch = "bump_uuid"}
#bluster = {path = "../../../bluster"}
# some potential gatt characteristics data sources
battery = "0.7.8"
sysinfo = "0.33.1"
rustler = { version = "0.36.1", default-features = false, features = ["derive", "nif_version_2_15"] }
rustler_codegen = "*"
bufstream = "0.1.4"
futures-util = "0.3"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
lazy_static = "1.4.0"
serde = "1.0"
serde_json = "1.0.134"
futures = "0.3.31"
once_cell = "1.19"
# MiMalloc won´t compile on Windows with the GCC compiler.
# On Linux with Musl it won´t load correctly.
[target.'cfg(not(any(all(windows, target_env = "gnu"), all(target_os = "linux", target_env = "musl"))))'.dependencies]
mimalloc = { version = "*", default-features = false , optional = true }
[dev-dependencies]
rand = "0.9.0"
# clippy = { version = "0.0.302" }
#[target.aarch64-unknown-linux-gnu.dependencies]
#dbus = {version = "0.9.7", features = ["vendored"]}
[target.'cfg(target_os = "linux")'.dependencies]
dbus = { version = "0.9.7", features = ["vendored"] }
[target.aarch64-unknown-linux-musl.dependencies]
serde = { version = "1.0", default-features = false, features = ["alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
btleplug = { version = "0.11.7", default-features = false }
mimalloc = { version = "*", default-features = false}
[target.x86_64-unknown-linux-musl.dependencies]
serde = { version = "1.0", default-features = false, features = ["alloc"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
btleplug = { version = "0.11.7", default-features = false }
mimalloc = { version = "*", default-features = false }
#[workspace.lints.rust]
#unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }