crosvm/swap/Cargo.toml
Shintaro Kawamura 8590cdcc8a swap: expose Status interface to all variants
Status does not depend on any swap related feature. Exposing Status to
all variants is easy to implement swap status FFI at crosvm_control.

The new "swap/enable" feature switches the actual vmm-swap functionality
to be compiled. The feature is enabled by default on "swap" crate but
disabled on the root package for test dependency.

Vmm-swap feature is enabled by `--features=swap` flag on cargo build as
before.

swap/src/controller.rs is copied from swap/src/lib.rs.

BUG=b:265386761
TEST=tools/dev_container tools/run_tests2

Change-Id: Ifc2539a62d0f594fd5bbb41623c735ea2621f7b6
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4486546
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: David Stevens <stevensd@chromium.org>
2023-05-04 12:30:09 +00:00

46 lines
1.1 KiB
TOML

[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]
default = ["enable"]
trace_marker = ["cros_tracing/trace_marker"]
log_page_fault = []
enable = ["userfaultfd", "userfaultfd-sys"]
[dependencies]
anyhow = "*"
base = { path = "../base" }
cfg-if = "*"
cros_tracing = { path = "../cros_tracing" }
data_model = { path = "../common/data_model" }
jail = { path = "../jail"}
num_cpus = "*"
once_cell = "*"
remain = "*"
serde = { version = "1", features = [ "derive" ] }
serde_json = "*"
sync = { path = "../common/sync" } # provided by ebuild
thiserror = "*"
vm_memory = { path = "../vm_memory"}
[target.'cfg(unix)'.dependencies]
libc = "*"
[target.'cfg(target_os="linux")'.dependencies]
userfaultfd = { version = "0.5.0", optional = true }
userfaultfd-sys = { version = "0.4.2", optional = true }
[dev_dependencies]
libtest-mimic = "0.6"
tempfile = "*"