diff options
Diffstat (limited to 'components/shared/script')
-rw-r--r-- | components/shared/script/Cargo.toml | 3 | ||||
-rw-r--r-- | components/shared/script/lib.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/components/shared/script/Cargo.toml b/components/shared/script/Cargo.toml index 9e11eb10e62..a1e71af824d 100644 --- a/components/shared/script/Cargo.toml +++ b/components/shared/script/Cargo.toml @@ -12,13 +12,14 @@ name = "script_traits" path = "lib.rs" [features] +bluetooth = ["bluetooth_traits"] webgpu = [] [dependencies] background_hang_monitor_api = { workspace = true } base = { workspace = true } bitflags = { workspace = true } -bluetooth_traits = { workspace = true } +bluetooth_traits = { workspace = true, optional = true } canvas_traits = { workspace = true } cookie = { workspace = true } crossbeam-channel = { workspace = true } diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs index f76faaef79a..5c46dc01bef 100644 --- a/components/shared/script/lib.rs +++ b/components/shared/script/lib.rs @@ -27,6 +27,7 @@ use base::id::{ }; use base::Epoch; use bitflags::bitflags; +#[cfg(feature = "bluetooth")] use bluetooth_traits::BluetoothRequest; use canvas_traits::webgl::WebGLPipeline; use crossbeam_channel::{RecvTimeoutError, Sender}; @@ -517,6 +518,7 @@ pub struct InitialScriptState { /// A channel to the resource manager thread. pub resource_threads: ResourceThreads, /// A channel to the bluetooth thread. + #[cfg(feature = "bluetooth")] pub bluetooth_sender: IpcSender<BluetoothRequest>, /// The image cache for this script thread. pub image_cache: Arc<dyn ImageCache>, |