Files
servo/components/constellation/Cargo.toml
WaterWhisperer 6623cc1dbb feat: gamepad feature flag (#41451)
Put the Gamepad API and its supporting infrastructure behind a `gamepad`
feature flag. This allows embedders to opt-out of gamepad support at
compile time to save on binary size and reduce dependencies.

Testing:
1. `./mach build -d` (Gamepad enabled by default)
2. `cargo build -p servoshell --no-default-features --features
"libservo/clipboard,js_jit,max_log_level,webgpu"` (Gamepad Disabled)
3. `cargo build -p servoshell --features "gamepad,webxr,..."` (Gamepad &
WebXR Enabled)

Fixes: #40897

Signed-off-by: WaterWhisperer <waterwhisperer24@qq.com>
2025-12-21 13:18:06 +00:00

72 lines
2.2 KiB
TOML

[package]
name = "constellation"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
name = "constellation"
path = "lib.rs"
[features]
default = []
bluetooth = ["bluetooth_traits"]
gamepad = ["embedder_traits/gamepad"]
tracing = ["dep:tracing", "canvas/tracing"]
vello = ["canvas/vello"]
vello_cpu = ["canvas/vello_cpu"]
webgpu = ["script_traits/webgpu"]
[lints.clippy]
unwrap_used = "deny"
panic = "deny"
[dependencies]
background_hang_monitor = { path = "../background_hang_monitor" }
background_hang_monitor_api = { workspace = true }
backtrace = { workspace = true }
base = { workspace = true }
bluetooth_traits = { workspace = true, optional = true }
canvas = { path = "../canvas" }
canvas_traits = { workspace = true }
compositing_traits = { workspace = true }
constellation_traits = { workspace = true }
content-security-policy = { workspace = true }
crossbeam-channel = { workspace = true }
devtools_traits = { workspace = true }
embedder_traits = { workspace = true }
euclid = { workspace = true }
fonts = { path = "../fonts" }
ipc-channel = { workspace = true }
keyboard-types = { workspace = true }
layout_api = { workspace = true }
log = { workspace = true }
media = { path = "../media" }
net = { path = "../net" }
net_traits = { workspace = true }
parking_lot = { workspace = true }
profile = { path = "../profile" }
profile_traits = { workspace = true }
rand = { workspace = true }
rustc-hash = { workspace = true }
script_traits = { workspace = true }
serde = { workspace = true }
servo-tracing = { workspace = true }
servo_config = { path = "../config" }
servo_url = { path = "../url" }
storage_traits = { workspace = true }
stylo = { workspace = true }
stylo_traits = { workspace = true }
tracing = { workspace = true, optional = true }
webgpu = { path = "../webgpu" }
webgpu_traits = { workspace = true }
webrender = { workspace = true }
webrender_api = { workspace = true }
webxr-api = { workspace = true, features = ["ipc"] }
[target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_env="ohos"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies]
gaol = "0.2.1"