deviceplug / btleplug

Rust Cross-Platform Host-Side Bluetooth LE Access Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add WASM/WebBluetooth Support

qdot opened this issue · comments


Not particularly sure how it'll be useful, but its the future, so why not.

Pretty much all of the API redesigns will need to happen before this I'm guessing, as we'll need to figure out how futures will convert and what not. Lots to think about.


This will basically be a wrapper around wasm_bindings WebSys, which still needs a gecko style WebIDL impl for WebBluetooth written for it.

Guess who's probably doing that. :|


WebBluetooth IDL support has landed into web-sys, and a WASM implementation is available at in the WASM module. This could probably be ported over here at any time (though some web-sys IDL generation fixes are still needed)


BTW, if someone sees this and wants to try to do it, you will most likely want to talk to me first. Getting the lifetimes right for the WASM/JS execution model is tricky.