mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
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>
65 lines
1.7 KiB
TOML
65 lines
1.7 KiB
TOML
[package]
|
|
name = "script_bindings"
|
|
build = "build.rs"
|
|
version.workspace = true
|
|
authors.workspace = true
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
# https://github.com/rust-lang/cargo/issues/3544
|
|
links = "script_bindings_crate"
|
|
|
|
[lib]
|
|
name = "script_bindings"
|
|
path = "lib.rs"
|
|
|
|
[dependencies]
|
|
bitflags = { workspace = true }
|
|
crossbeam-channel = { workspace = true }
|
|
cssparser = { workspace = true }
|
|
deny_public_fields = { path = "../deny_public_fields" }
|
|
dom_struct = { path = "../dom_struct" }
|
|
domobject_derive = { path = "../domobject_derive" }
|
|
html5ever = { workspace = true }
|
|
indexmap = { workspace = true }
|
|
js = { workspace = true }
|
|
jstraceable_derive = { path = "../jstraceable_derive" }
|
|
keyboard-types = { workspace = true }
|
|
libc = { workspace = true }
|
|
log = { workspace = true }
|
|
malloc_size_of = { workspace = true }
|
|
malloc_size_of_derive = { workspace = true }
|
|
num-traits = { workspace = true }
|
|
parking_lot = { workspace = true }
|
|
phf = "0.13"
|
|
regex = { workspace = true }
|
|
servo_arc = { workspace = true }
|
|
servo_config = { path = "../config" }
|
|
servo_url = { path = "../url" }
|
|
smallvec = { workspace = true }
|
|
stylo = { workspace = true }
|
|
stylo_atoms = { workspace = true }
|
|
tendril = { version = "0.4.1", features = ["encoding_rs"] }
|
|
tracing = { workspace = true, optional = true }
|
|
webxr-api = { workspace = true, optional = true }
|
|
xml5ever = { workspace = true }
|
|
|
|
[build-dependencies]
|
|
phf_codegen = "0.13"
|
|
phf_shared = "0.13"
|
|
serde_json = { workspace = true }
|
|
|
|
[features]
|
|
bluetooth = []
|
|
gamepad = []
|
|
testbinding = []
|
|
tracing = ["dep:tracing"]
|
|
webgpu = []
|
|
webxr = ["webxr-api"]
|
|
|
|
[lints.rust]
|
|
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(crown)'] }
|
|
unsafe_op_in_unsafe_fn = { level = "allow" }
|