Last verified: 2026-03-08
- Language: Rust (edition 2024)
- Platforms: Windows (WinRT), macOS/iOS (CoreBluetooth), Linux (BlueZ), Android (JNI)
- Async runtime: Tokio
- Testing:
cargo test, integration tests require BLE hardware/virtual peripheral
cargo build-- Build for host platformcargo test-- Run unit testscargo test --test '*' -- --ignored-- Run integration tests (requires test peripheral)scripts/run-jni-tests.sh-- Compile Java sources and run JNI host tests on host JVMscripts/run-integration-tests.sh-- Run BLE integration tests (requires test peripheral)scripts/run-integration-tests-android.sh-- Run Android integration testsscripts/build-java.sh-- Build Java/Android components
src/api/-- Public BLE API traits (Manager, Central, Peripheral)src/bluez/-- Linux BlueZ backendsrc/corebluetooth/-- macOS/iOS CoreBluetooth backendsrc/droidplug/-- Android JNI backendsrc/winrtble/-- Windows WinRT backendsrc/common/-- Shared utilities (non-Linux platforms)src/platform/-- Platform-specific type exportstests/-- Integration test suite (seetests/CLAUDE.md)test-peripheral/-- BLE test peripheral implementations (seetest-peripheral/CLAUDE.md)scripts/-- Build and test automation scripts
serde-- Enable serde serialization for BLE typesjni-host-tests-- Enable host-side JNI testing (non-Android only). Brings injni/invocationandonce_cellas optional deps. Compilesdroidplug::jni_utilson the host for unit testing without an Android device.
- Each platform backend is a separate module, conditionally compiled via
cfg - Public API is defined as traits in
src/api/; backends implement these traits - Platform-specific types are re-exported through
src/platform/
- Never import backend modules (
bluez,corebluetooth,droidplug,winrtble) directly from outsidesrc/; useplatformre-exports tests/integration tests are all#[ignore]-- they require a running test peripheral