btleplug icon indicating copy to clipboard operation
btleplug copied to clipboard

Add WASM/WebBluetooth Support

Open qdot opened this issue 5 years ago • 6 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.

qdot avatar Jan 11 '20 23:01 qdot

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. :|

qdot avatar Jun 25 '20 06:06 qdot

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

qdot avatar Sep 20 '20 18:09 qdot

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.

qdot avatar Sep 20 '20 18:09 qdot

How's this going? Is this still in progress?

arlyxiao avatar Mar 12 '23 12:03 arlyxiao

^^ Any Progress?

SyedKaz00 avatar Apr 03 '23 05:04 SyedKaz00

Having WASM support would be awesome!

Since it is not currently supported, I have resorted to using this crate and the web-sys using an even more abstracted API

ActuallyHappening avatar Apr 07 '23 23:04 ActuallyHappening