servo/components/background_hang_monitor/Cargo.toml
CarePackage17 f682f9d6f5
Enable LinuxSampler to be used on Android (#37784)
This enables `background_hang_monitor` to work on Android. Relevant
Zulip thread: [#general > Android stack walking questions @
💬](https://servo.zulipchat.com/#narrow/channel/263398-general/topic/Android.20stack.20walking.20questions/near/526369883)


Testing: Manually tested on a Pixel 6a with Android 16 with following
page:
```html
<!DOCTYPE html>
<html>
    <head>
        <title>Infinite Loop Test</title>
    </head>
    <body>
        Will it print? That is the question.
    </body>
    <script>
        console.log("hello. you're about to loop infinitely.");

        while (true) {
            //do nothing, just block the thread
        }
    </script>
</html>
```
Fixes: #23136

---------

Signed-off-by: CarePackage17 <5157010+CarePackage17@users.noreply.github.com>
2025-06-30 17:17:50 +00:00

36 lines
1 KiB
TOML

[package]
name = "background_hang_monitor"
version.workspace = true
authors.workspace = true
license.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
[lib]
name = "background_hang_monitor"
path = "lib.rs"
test = false
doctest = false
[dependencies]
background_hang_monitor_api = { workspace = true }
backtrace = { workspace = true }
base = { workspace = true }
crossbeam-channel = { workspace = true }
ipc-channel = { workspace = true }
libc = { workspace = true }
log = { workspace = true }
serde_json = { workspace = true }
[target.'cfg(target_os = "macos")'.dependencies]
mach2 = { version = "0.4", optional = true }
[target.'cfg(all(target_os = "linux", not(any(target_arch = "arm", target_arch = "aarch64", target_env = "ohos", target_env = "musl"))))'.dependencies]
nix = { workspace = true, features = ["signal"], optional = true }
[target.'cfg(target_os = "android")'.dependencies]
nix = { workspace = true, features = ["signal"], optional = true }
[features]
sampler = ["mach2", "nix"]