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
rustler_btleplug native btleplug_client Cargo.toml
Raw

native/btleplug_client/Cargo.toml

[package]
name = "btleplug_client"
version = "0.0.17-alpha"
keywords = ["bluetooth", "BLE", "bluez", "uwp", "corebluetooth"]
categories = ["hardware-support"]
edition = "2021"
[lib]
name = "btleplug_client"
path = "src/lib.rs"
crate-type = ["dylib", "staticlib"]
# crate-type = ["staticlib"]
#compatibility-version = "0.0.0"
#current-version = "0.0.0"
[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]
log = "0.4.22"
pretty_env_logger = "0.5.0"
chrono = "0.4.40"
serde_json = "1.0.93"
btleplug = { version = "0.11.7", features = ["serde"] }
ble-peripheral-rust = "0.2.0"
uuid = "1.16"
#rustler = { version = "0.36.1", default-features = false, features = ["derive", "nif_version_2_15"] }
# branch = "static"
rustler = { git = "https://github.com/filmor/rustler.git", rev = "17740a6dc39c79e47e94dd5e59914d30777a0131", default-features = false, features = ["staticlib", "derive", "nif_version_2_15"]}
rustler_codegen = "*"
#tokio = { version = "1", features = ["full"] }
tokio = { version = "1", features = ["rt", "macros", "rt-multi-thread", "net", "time"] }
futures = "0.3.31"
once_cell = "1.19"
lazy_static = "1.3.0"
# 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 }