The main aim of BlurMac is to enable WebBluetooth in Servo on macOS. Thus, API and implementation decisions are affected by the encapsulating Devices, and the sibling BlurZ and BlurDroid crates.
Usually, you don‘t want to work with BlurMac on its own but use it within Servo. So, most probably you’ll want to run Servo with WebBluetooth enabled:
RUST_LOG=blurmac \
./mach run \
--dev \
--pref=dom.bluetooth.enabled \
--pref=dom.permissions.testing.allowed_in_nonsecure_contexts \
URL
Notes:
RUST_LOG part). It runs Servo with WBT enabled on any platform where WBT is supported.RUST_LOG=blurmac part if you don’t want to see BlurMac debug messages on the console.--dev part if you want to run a release build.--pref=dom.permissions.testing.allowed_in_nonsecure_contexts part if your URL is https (but you do need it if you test a local file).Tested on:
Licensed under the BSD 3-Clause License.