Integrate the devices respository (#30974)

Despite the name of this dependency, it only handles bluetooth. Because
it's a separate repository. Integrating it, allows changes here to be
tested more consistently. In addition, it's likely that new bluetooth
libraries will allow removing the majority of the platform-specific code
in this directory.

This is based on the version of this dependency from:
https://github.com/servo/devices/pull/34
This commit is contained in:
Martin Robinson 2024-01-09 10:13:41 +01:00 committed by GitHub
parent fddc4a430f
commit 6a804cd775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 3880 additions and 27 deletions

View file

@ -13,7 +13,7 @@ path = "lib.rs"
[dependencies]
bitflags = { workspace = true }
bluetooth_traits = { workspace = true }
device = { git = "https://github.com/servo/devices", features = ["bluetooth-test"], rev = "cb28c4725ffbfece99dab842d17d3e8c50774778" }
blurmock = { version = "0.1.2", optional = true }
embedder_traits = { workspace = true }
ipc-channel = { workspace = true }
log = { workspace = true }
@ -22,4 +22,14 @@ servo_rand = { path = "../rand" }
uuid = { workspace = true }
[features]
native-bluetooth = ["device/bluetooth"]
native-bluetooth = ["blurz", "blurdroid", "blurmac", "bluetooth-test"]
bluetooth-test = ["blurmock"]
[target.'cfg(target_os = "linux")'.dependencies]
blurz = { version = "0.3", optional = true }
[target.'cfg(target_os = "android")'.dependencies]
blurdroid = { version = "0.1.2", optional = true }
[target.'cfg(target_os = "macos")'.dependencies]
blurmac = { path = "../../third_party/blurmac", optional = true }