[package] name = "swap" version = "0.1.0" authors = ["The ChromiumOS Authors"] edition = "2021" # The process tests will use fork, which requires a custom test harness to enforce single threaded # execution. [[test]] name = "main" path = "tests/main.rs" harness = false [features] trace_marker = ["cros_tracing/trace_marker"] enable = ["userfaultfd", "userfaultfd-sys"] [dependencies] anyhow = "1" base = { path = "../base" } cfg-if = "1" cros_tracing = { path = "../cros_tracing" } jail = { path = "../jail" } metrics = { path = "../metrics" } num_cpus = "1" once_cell = "1.7" remain = "0.2" serde = { version = "1", features = ["derive"] } serde_json = "1" sync = { path = "../common/sync" } # provided by ebuild thiserror = "1" vm_memory = { path = "../vm_memory" } [target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies] libc = "0.2" [target.'cfg(target_os="linux")'.dependencies] userfaultfd = { version = "0.8.1", optional = true } userfaultfd-sys = { version = "0.5.0", optional = true } [dev-dependencies] libtest-mimic = "0.6" tempfile = "3"