[package] name = "hyperlight-host" version.workspace = true edition.workspace = true rust-version.workspace = true license.workspace = true homepage.workspace = true repository.workspace = true readme.workspace = true description = """ A lightweight Virtual Machine Manager that can be hosted in an application to safely run untrusted or code within a VM partition with very low latency and overhead. """ [lib] # https://docs.rust-embedded.org/book/interoperability/rust-with-c.html name = "hyperlight_host" bench = false # see https://bheisler.github.io/criterion.rs/book/faq.html#cargo-bench-gives-unrecognized-option-errors-for-valid-command-line-options [lints] workspace = true [dependencies] goblin = { version = "0.9" } rand = { version = "0.8.5" } cfg-if = { version = "1.0.0" } libc = { version = "0.2.155" } paste = "1.0" flatbuffers = "24.3.25" page_size = "0.6.0" termcolor = "1.2.0" bitflags = "2.4.0" lazy_static = "1.4.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" log = "0.4.20" once_cell = { version = "1.18.0" } tracing = { version = "0.1.37", features = ["log"] } tracing-log = "0.2.0" tracing-core = "0.1.31" uuid = { version = "1.4.1", features = ["v4"] } hyperlight-common = { workspace = true, default-features = true } rust-embed = { version = "8.3.0", features = ["debug-embed", "include-exclude", "interpolate-folder-path"] } sha256 = "1.4.0" vmm-sys-util = "0.12.1" crossbeam = "0.8.0" crossbeam-channel = "0.5.8" thiserror = "1.0.30" prometheus = "0.13.3" strum = { version = "0.25", features = ["derive"] } tempfile = {version = "3.10", optional = true} serde_yaml = "0.9" anyhow = "1.0" [target.'cfg(windows)'.dependencies] windows = { version = "0.58", features = [ "Win32_Foundation", "Win32_System_LibraryLoader", "Win32_System_Threading", "Win32_System_JobObjects", "Win32_Security", "Win32_System_Diagnostics_Debug", "Win32_System_Hypervisor", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Threading", "Win32_System_JobObjects", ] } windows-sys = { version = "0.59", features = ["Win32"] } windows-result = "0.2" [target.'cfg(unix)'.dependencies] seccompiler = { version = "0.4.0", optional = true } mshv-bindings = { workspace = true, optional = true } mshv-ioctls = { workspace = true, optional = true } kvm-bindings = { version = "0.10.0", features = ["fam-wrappers"], optional = true } kvm-ioctls = { version = "0.19.0", optional = true } [dev-dependencies] signal-hook-registry = "1.4.1" envy = { version = "0.4.2" } serde = "1.0" proptest = "1.2.0" tempfile = "3.8.0" crossbeam-queue = "0.3.8" tracing-serde = "0.1.3" serial_test = "3.1.1" hyperlight-testing = { workspace = true } env_logger = "0.11.5" tracing-forest = { version = "0.1.6", features = ["uuid","chrono","smallvec","serde","env-filter"] } tracing = "0.1.37" tracing-subscriber = {version = "0.3.18", features = ["std", "env-filter"]} tracing-opentelemetry = "0.27.0" opentelemetry = "0.26.0" opentelemetry-otlp = { version = "0.26.0", features = ["default"] } opentelemetry_sdk = { version = "0.26.0", features = ["rt-tokio"] } tokio = { version = "1.34.0", features = ["full"] } criterion = "0.5.1" tracing-chrome = "0.7.2" [target.'cfg(windows)'.dev-dependencies] windows = { version = "0.58", features = [ "Win32_System_Diagnostics_ToolHelp", ] } [target.'cfg(unix)'.dev-dependencies] proc-maps = "0.4.0" [build-dependencies] anyhow = { version = "1.0.75" } cfg_aliases = "0.2.1" built = { version = "0.7.0", features = ["chrono","git2"] } [features] default = ["kvm", "mshv", "seccomp"] seccomp = ["dep:seccompiler"] function_call_metrics = [] executable_heap = [] # This feature enables printing of debug information to stdout in debug builds print_debug = [] # This feature enables dunping of the VMs details to a file when an unexpected or error exit occurs in a VM in debug mode # the name of the file is output to stdout and logged. dump_on_crash = ["dep:tempfile"] kvm = ["dep:kvm-bindings", "dep:kvm-ioctls"] mshv = ["dep:mshv-bindings", "dep:mshv-ioctls"] inprocess = [] [[bench]] name = "benchmarks" harness = false