Skip to content

Commit

Permalink
Merge pull request #452 from marshallpierce/mp/rust-0.2.0
Browse files Browse the repository at this point in the history
Bumble crate 0.2.0
  • Loading branch information
barbibulle committed Mar 22, 2024
2 parents a9c62c4 + b8214bf commit 69c6643
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 8 deletions.
7 changes: 5 additions & 2 deletions rust/CHANGELOG.md
@@ -1,7 +1,10 @@
# Next
# 0.2.0

- Code-gen company ID table
- Unstable support for extended advertisements
- CLI tools for downloading Realtek firmware
- PDL-generated types for HCI commands

# 0.1.0

- Initial release
- Initial release
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "bumble"
description = "Rust API for the Bumble Bluetooth stack"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
license = "Apache-2.0"
homepage = "https://google.github.io/bumble/index.html"
Expand Down
7 changes: 6 additions & 1 deletion rust/README.md
Expand Up @@ -37,6 +37,11 @@ PYTHONPATH=..:[virtualenv site-packages] \
cargo run --features bumble-tools --bin bumble -- --help
```

Notable subcommands:

- `firmware realtek download`: download Realtek firmware for various chipsets so that it can be automatically loaded when needed
- `usb probe`: show USB devices, highlighting the ones usable for Bluetooth

# Development

Run the tests:
Expand All @@ -63,4 +68,4 @@ To regenerate the assigned number tables based on the Python codebase:

```
PYTHONPATH=.. cargo run --bin gen-assigned-numbers --features dev-tools
```
```
2 changes: 1 addition & 1 deletion rust/src/wrapper/controller.rs
Expand Up @@ -35,7 +35,7 @@ impl Controller {
/// module specifies the defaults. Must be called from a thread with a Python event loop, which
/// should be true on `tokio::main` and `async_std::main`.
///
/// For more info, see https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars.
/// For more info, see <https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars>.
pub async fn new(
name: &str,
host_source: Option<TransportSource>,
Expand Down
2 changes: 1 addition & 1 deletion rust/src/wrapper/hci.rs
Expand Up @@ -149,7 +149,7 @@ impl ToPyObject for Address {

/// An error meaning that the u64 value did not represent a valid BT address.
#[derive(Debug)]
pub struct InvalidAddress(u64);
pub struct InvalidAddress(#[allow(unused)] u64);

impl TryInto<packets::Address> for Address {
type Error = ConversionError<InvalidAddress>;
Expand Down
2 changes: 1 addition & 1 deletion rust/src/wrapper/l2cap.rs
Expand Up @@ -71,7 +71,7 @@ impl LeConnectionOrientedChannel {
/// Must be called from a thread with a Python event loop, which should be true on
/// `tokio::main` and `async_std::main`.
///
/// For more info, see https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars.
/// For more info, see <https://awestlake87.github.io/pyo3-asyncio/master/doc/pyo3_asyncio/#event-loop-references-and-contextvars>.
pub async fn disconnect(&mut self) -> PyResult<()> {
Python::with_gil(|py| {
self.0
Expand Down

0 comments on commit 69c6643

Please sign in to comment.