mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
This contains Rust wrappers around enough of the Python API to implement Rust versions of the `battery_client` and `run_scanner` examples. The goal is to gather feedback on the approach, and of course to show that it is possible. The module structure mirrors that of the Python. The Rust API is not optimally Rust-y, but given the constraints of everything having to delegate to Python, it's at least usable. Notably, this does not yet solve the packaging problem: users must have an appropriate virtualenv, libpython, etc. [PyOxidizer](https://github.com/indygreg/PyOxidizer) may be a viable path there.
49 lines
1.4 KiB
TOML
49 lines
1.4 KiB
TOML
[package]
|
|
name = "bumble"
|
|
description = "Rust API for the Bumble Bluetooth stack"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "Apache-2.0"
|
|
homepage = "https://google.github.io/bumble/index.html"
|
|
repository = "https://github.com/google/bumble"
|
|
documentation = "https://docs.rs/crate/bumble"
|
|
authors = ["Marshall Pierce <marshallpierce@google.com>"]
|
|
keywords = ["bluetooth", "ble"]
|
|
categories = ["api-bindings", "network-programming"]
|
|
rust-version = "1.69.0"
|
|
|
|
[dependencies]
|
|
pyo3 = { version = "0.18.3", features = ["macros"] }
|
|
pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime"] }
|
|
tokio = { version = "1.28.2" }
|
|
nom = "7.1.3"
|
|
strum = "0.25.0"
|
|
strum_macros = "0.25.0"
|
|
hex = "0.4.3"
|
|
itertools = "0.11.0"
|
|
lazy_static = "1.4.0"
|
|
thiserror = "1.0.41"
|
|
|
|
[dev-dependencies]
|
|
tokio = { version = "1.28.2", features = ["full"] }
|
|
tempfile = "3.6.0"
|
|
nix = "0.26.2"
|
|
anyhow = "1.0.71"
|
|
pyo3 = { version = "0.18.3", features = ["macros", "anyhow"] }
|
|
pyo3-asyncio = { version = "0.18.0", features = ["tokio-runtime", "attributes", "testing"] }
|
|
clap = { version = "4.3.3", features = ["derive"] }
|
|
owo-colors = "3.5.0"
|
|
log = "0.4.19"
|
|
env_logger = "0.10.0"
|
|
rusb = "0.9.2"
|
|
rand = "0.8.5"
|
|
|
|
# test entry point that uses pyo3_asyncio's test harness
|
|
[[test]]
|
|
name = "pytests"
|
|
path = "pytests/pytests.rs"
|
|
harness = false
|
|
|
|
[features]
|
|
anyhow = ["pyo3/anyhow"]
|
|
pyo3-asyncio-attributes = ["pyo3-asyncio/attributes"] |