Skip to content

v0.17.0

Choose a tag to compare

@blec-release-bot blec-release-bot released this 22 Sep 10:41
8a05809

0.17.0 (2026-09-22)

blec is now its own crate, with a Tauri plugin and Dioxus hooks on top

The BLE client that used to live inside tauri-plugin-blec has moved into a host agnostic crate, and a second host has joined it.

Crate What it is
blec The BLE client: handler, models, platform backends and the mock. No dependency on any UI framework.
tauri-plugin-blec Thin Tauri layer over blec with the @mnlphlp/plugin-blec JavaScript API. Re-exports the whole blec rust API.
dioxus-blec New. use_ble() and use_ble_notifications() hooks for Dioxus 0.7, mirroring the client state into signals. Re-exports blec as well.

All three crates and the npm package share one version number and one git tag from now on.

Tauri users

Existing code keeps working. tauri_plugin_blec::get_handler(), the models and the mock are the same types as before, re-exported from blec. The JavaScript API is unchanged. Two rust breaking changes:

  • check_permissions is async now. It waits for the user to answer the permission dialog instead of returning immediately.
  • Error::PluginInvoke is gone. Android failures are reported as Error::Android(String).

Nothing changes in the Android setup. The plugin's android module still carries the bluetooth permissions and the Kotlin side of the client, and tauri builds it into the app as before.

Dioxus users

Add dioxus-blec and set min_sdk = 26 under [android] in Dioxus.toml. That is the whole Android setup: the crate ships the bluetooth permissions and the Kotlin backend as a gradle module that dx builds into the app, so there is no manifest to edit and no gradle module to add. See examples/dioxus-example for a complete app.

Other rust apps

Depend on blec directly. blec::init() creates the handler, blec::get_handler() returns it from anywhere afterwards. On Android the host has to build crates/blec/android/lib into its gradle project or enable the embedded-dex feature, which embeds the same Kotlin as a prebuilt classes.dex and loads it at startup. The README explains the trade-offs of the dex path.

Under the hood

  • The Android backend no longer goes through tauri's plugin invoke mechanism. Rust talks to the Kotlin module over a small JNI bridge, and the module is an ordinary android library shared by both hosts.
  • Runtime permission handling lives in blec and tracks the current activity itself, so it works the same in Tauri, Dioxus and custom hosts.
  • The handler tests and the mock backend moved with the code and run with cargo test --workspace.