Files
servo/components/script/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

171 lines
5.5 KiB
TOML

[package]
name = "script"
build = "build.rs"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
name = "script"
path = "lib.rs"
[features]
bluetooth = ['bluetooth_traits', 'script_bindings/bluetooth']
crown = ['js/crown']
debugmozjs = ['js/debugmozjs']
gamepad = ["script_bindings/gamepad", "embedder_traits/gamepad"]
jitspew = ['js/jitspew']
js_backtrace = []
js_jit = ["js/jit"]
profilemozjs = ['js/profilemozjs']
refcell_backtrace = ["accountable-refcell"]
testbinding = ["script_bindings/testbinding"]
tracing = ["dep:tracing", "script_bindings/tracing"]
webgl_backtrace = ["canvas_traits/webgl_backtrace"]
webgpu = ["script_bindings/webgpu", "script_traits/webgpu"]
webxr = ["gamepad", "webxr-api", "script_bindings/webxr"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crown)'] }
[dependencies]
accountable-refcell = { workspace = true, optional = true }
aes = { workspace = true }
aes-gcm = { workspace = true }
aes-kw = { workspace = true }
app_units = { workspace = true }
argon2 = { workspace = true }
arrayvec = { workspace = true }
atomic_refcell = { workspace = true }
aws-lc-rs = { workspace = true }
background_hang_monitor_api = { workspace = true }
backtrace = { workspace = true }
base = { workspace = true }
base64 = { workspace = true }
base64ct = { workspace = true }
bincode = { workspace = true }
bitflags = { workspace = true }
bluetooth_traits = { workspace = true, optional = true }
brotli = { workspace = true }
canvas_traits = { workspace = true }
cbc = { workspace = true }
chacha20poly1305 = { workspace = true }
chardetng = { workspace = true }
chrono = { workspace = true }
cipher = { workspace = true }
compositing_traits = { workspace = true }
constellation_traits = { workspace = true }
content-security-policy = { workspace = true }
cookie = { workspace = true }
crossbeam-channel = { workspace = true }
cssparser = { workspace = true }
ctr = { workspace = true }
data-url = { workspace = true }
deny_public_fields = { path = "../deny_public_fields" }
devtools_traits = { workspace = true }
digest = { workspace = true }
dom_struct = { path = "../dom_struct" }
domobject_derive = { path = "../domobject_derive" }
ecdsa = { workspace = true }
elliptic-curve = { workspace = true }
embedder_traits = { workspace = true }
encoding_rs = { workspace = true }
euclid = { workspace = true }
flate2 = { workspace = true }
fonts = { path = "../fonts" }
fonts_traits = { workspace = true }
glow = { workspace = true }
headers = { workspace = true }
hkdf = { workspace = true }
html5ever = { workspace = true }
http = { workspace = true }
hyper_serde = { workspace = true }
image = { workspace = true }
indexmap = { workspace = true }
ipc-channel = { workspace = true }
itertools = { workspace = true }
js = { workspace = true }
jstraceable_derive = { path = "../jstraceable_derive" }
keyboard-types = { workspace = true }
kurbo = { workspace = true }
layout_api = { workspace = true }
libc = { workspace = true }
log = { workspace = true }
malloc_size_of = { workspace = true }
malloc_size_of_derive = { workspace = true }
markup5ever = { workspace = true }
media = { path = "../media" }
metrics = { path = "../metrics" }
mime = { workspace = true }
mime_guess = { workspace = true }
net_traits = { workspace = true }
nom = { workspace = true }
nom-rfc8288 = { workspace = true }
num-bigint-dig = { workspace = true }
num-traits = { workspace = true }
num_cpus = { workspace = true }
p256 = { workspace = true }
p384 = { workspace = true }
p521 = { workspace = true }
parking_lot = { workspace = true }
percent-encoding = { workspace = true }
phf = "0.13"
pixels = { path = "../pixels" }
pkcs8 = { workspace = true }
profile_traits = { workspace = true }
rand = { workspace = true }
range = { path = "../range" }
regex = { workspace = true }
rsa = { workspace = true }
rustc-hash = { workspace = true }
script_bindings = { path = "../script_bindings" }
script_traits = { workspace = true }
sec1 = { workspace = true }
selectors = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
servo-media = { workspace = true }
servo_arc = { workspace = true }
servo_config = { path = "../config" }
servo_geometry = { path = "../geometry" }
servo_url = { path = "../url" }
sha1 = { workspace = true }
sha2 = { workspace = true }
sha3 = { workspace = true }
smallvec = { workspace = true }
storage_traits = { workspace = true }
strum = { workspace = true }
stylo = { workspace = true }
stylo_atoms = { workspace = true }
stylo_dom = { workspace = true }
stylo_malloc_size_of = { workspace = true }
stylo_traits = { workspace = true }
swapper = "0.1"
tempfile = "3"
tendril = { version = "0.4.1", features = ["encoding_rs"] }
time = { workspace = true }
timers = { path = "../timers" }
tracing = { workspace = true, optional = true }
unicode-bidi = { workspace = true }
unicode-script = { workspace = true }
unicode-segmentation = { workspace = true }
url = { workspace = true }
urlpattern = { workspace = true }
utf-8 = { workspace = true }
uuid = { workspace = true, features = ["serde"] }
webdriver = { workspace = true }
webgpu_traits = { workspace = true }
webrender_api = { workspace = true }
webxr-api = { workspace = true, features = ["ipc"], optional = true }
wgpu-core = { workspace = true }
wgpu-types = { workspace = true }
x25519-dalek = { workspace = true }
xml5ever = { workspace = true }
xpath = { workspace = true }
[target.'cfg(not(target_os = "ios"))'.dependencies]
mozangle = { workspace = true }