Files
servo/ports/servoshell/Cargo.toml
Gae24 e2f17e0d28 deps: Bump jni-rs to 0.22 (#44322)
Update jni-rs to 0.22, the main changes involve the introduction of
`with_env` within native methods, and updating uses of
`attach_current_thread`, which now requires a closure passed to it.
Callback object is now stored inside a `OnceLock`, since it would crash
when it was deleted, probably once a `WakeupCallback` was dropped:
```
JNI DETECTED ERROR IN APPLICATION: JNI ERROR (app bug): jobject is an invalid global reference: 0x2fc6 (deleted reference at index 382)
```
Also update android-activity and rustls-platform-verifier.

Testing: We don't have android tests in CI, manual testing is required
Fixes: Part of #40979

---------

Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2026-04-23 11:55:29 +00:00

150 lines
5.1 KiB
TOML

[package]
name = "servoshell"
build = "build.rs"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
repository.workspace = true
description.workspace = true
[lib]
name = "servoshell"
path = "lib.rs"
bench = false
[[bin]]
name = "servoshell"
path = "main.rs"
bench = false
[lints.rust]
# These are not official flags but still used for testing and pgo.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)', 'cfg(llvm_pgo)'] }
# Some of these dependencies are only needed for a specific target OS, but
# since build-scripts can't detect the Cargo target OS at build-time, we
# must unconditionally add these dependencies. See https://github.com/rust-lang/cargo/issues/4932
[build-dependencies]
# macOS only
cc = "1.2"
[target.'cfg(windows)'.build-dependencies]
winresource = "0.1"
[package.metadata.winresource]
FileDescription = "ServoShell"
LegalCopyright = "© The Servo Project Developers"
OriginalFilename = "servoshell.exe"
ProductName = "ServoShell"
[features]
default = ["baked-in-resources", "gamepad", "servo/clipboard", "js_jit", "max_log_level", "webgpu", "webxr"]
baked-in-resources = ["servo/baked-in-resources"]
crown = ["servo/crown"]
debugmozjs = ["servo/debugmozjs"]
gamepad = ["servo/gamepad"]
jitspew = ["servo/jitspew"]
js_backtrace = ["servo/js_backtrace"]
js_jit = ["servo/js_jit"]
max_log_level = ["log/release_max_level_info"]
media-gstreamer = ["servo/media-gstreamer"]
native-bluetooth = ["servo/native-bluetooth"]
profilemozjs = ["servo/profilemozjs"]
refcell_backtrace = ["servo/refcell_backtrace"]
tracing = ["dep:tracing", "dep:tracing-subscriber", "servo/tracing"]
tracing-hitrace = ["tracing", "dep:hitrace"]
tracing-perfetto = ["tracing", "dep:tracing-perfetto"]
vello = ["servo/vello"]
webgl_backtrace = ["servo/webgl_backtrace"]
webgpu = ["servo/webgpu"]
webxr = ["servo/webxr"]
[dependencies]
accesskit = { workspace = true }
bpaf = { version = "0.9.25", features = ["derive"] }
cfg-if = { workspace = true }
crossbeam-channel = { workspace = true }
dpi = { workspace = true }
euclid = { workspace = true }
hitrace = { workspace = true, optional = true }
image = { workspace = true }
keyboard-types = { workspace = true }
libc = { workspace = true }
log = { workspace = true }
mime_guess = { workspace = true }
raw-window-handle = { workspace = true }
rustls = { workspace = true, features = ["aws-lc-rs"] }
servo = { workspace = true, features = ["background_hang_monitor", "bluetooth", "testbinding"], default-features = false }
tokio = { workspace = true }
tracing = { workspace = true, optional = true }
tracing-perfetto = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true, features = ["env-filter"] }
url = { workspace = true }
webdriver_server = { workspace = true }
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.15"
jni = "0.22"
[target.'cfg(not(target_os = "android"))'.dependencies]
backtrace = { workspace = true }
[target.'cfg(target_env = "ohos")'.dependencies]
env_filter = "0.1.4"
euclid = { workspace = true }
hilog = "0.2.2"
# force inprocess until we add multi-process support for ohos
ipc-channel = { workspace = true, features = ["force-inprocess"] }
napi-derive-ohos = "1.1.6"
napi-ohos = "1.1.6"
ohos-abilitykit-sys = { version = "0.1.5", features = ["api-14"] }
ohos-deviceinfo = "0.1.0"
ohos-ime = "0.4.2"
ohos-ime-sys = "0.2.3"
ohos-vsync = "0.1.3"
ohos-window-manager-sys = { version = "0.1", features = ["api-14"] }
xcomponent-sys = { version = "0.3.5", features = ["api-14", "keyboard-types"] }
[target.'cfg(any(target_os = "android", target_env = "ohos"))'.dependencies]
servo-base = { workspace = true }
nix = { workspace = true, features = ["fs"] }
serde_json = { workspace = true }
surfman = { workspace = true, features = ["sm-angle-default"] }
[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
dirs = "6.0"
egui = { version = "0.34.1" }
egui-file-dialog = "0.13.0"
egui-winit = { version = "0.34.1", default-features = false, features = ["accesskit", "clipboard", "wayland"] }
egui_glow = { version = "0.34.1", features = ["winit"] }
gilrs = "0.11.1"
glow = { workspace = true }
headers = { workspace = true }
serde_json = { workspace = true }
# For optional feature servo-allocator/use-system-allocator and servo-allocator/allocation-tracking
servo-allocator = { workspace = true }
surfman = { workspace = true, features = ["sm-raw-window-handle-06", "sm-x11"] }
winit = { workspace = true }
[target.'cfg(any(all(target_os = "linux", not(target_env = "ohos")), target_os = "macos"))'.dependencies]
signal-hook-registry = "1.4.8"
[target.'cfg(target_os = "windows")'.dependencies]
servo = { workspace = true, features = ["no-wgl"] }
windows-sys = { workspace = true, features = ["Win32_Graphics_Gdi", "Win32_System_Console"] }
[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.3.2", default-features = false, features = [
"std",
"NSColorSpace",
"NSResponder",
"NSView",
"NSWindow",
] }
objc2-foundation = { version = "0.3.1", default-features = false, features = [
"std",
] }