# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.85"
name = "supermachine"
version = "0.7.78"
build = false
include = [
    "src/**/*.rs",
    "examples/**/*.rs",
    "entitlements.plist",
    "oci/init-oci.c",
    "Cargo.toml",
    "README.md",
    "LICENSE-APACHE",
]
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Run any OCI/Docker image as a hardware-isolated microVM on macOS HVF (Linux KVM and Windows WHP in progress). Single library API, zero flags for the common case, sub-100 ms cold-restore from snapshot."
documentation = "https://docs.rs/supermachine"
readme = "README.md"
keywords = [
    "microvm",
    "hypervisor",
    "oci",
    "docker",
    "snapshot",
]
categories = [
    "virtualization",
    "api-bindings",
    "command-line-utilities",
]
license = "Apache-2.0"

[features]
default = []
tokio = ["dep:tokio"]

[lib]
name = "supermachine"
path = "src/lib.rs"

[[bin]]
name = "cargo-supermachine"
path = "src/bin/cargo_plugin.rs"

[[bin]]
name = "supermachine"
path = "src/bin/cli.rs"

[[bin]]
name = "supermachine-router"
path = "src/bin/router.rs"

[[bin]]
name = "supermachine-worker"
path = "src/bin/worker.rs"

[[example]]
name = "_alpine_bake_profile"
path = "examples/_alpine_bake_profile.rs"

[[example]]
name = "_axis_bench"
path = "examples/_axis_bench.rs"

[[example]]
name = "_bake_warm"
path = "examples/_bake_warm.rs"

[[example]]
name = "_balloon_rss"
path = "examples/_balloon_rss.rs"

[[example]]
name = "_bench_prep"
path = "examples/_bench_prep.rs"

[[example]]
name = "_chunk_dedup_probe"
path = "examples/_chunk_dedup_probe.rs"

[[example]]
name = "_deadlock_repro"
path = "examples/_deadlock_repro.rs"

[[example]]
name = "_embed_bench"
path = "examples/_embed_bench.rs"

[[example]]
name = "_ensure_baked_smoke"
path = "examples/_ensure_baked_smoke.rs"

[[example]]
name = "_flame_graph"
path = "examples/_flame_graph.rs"

[[example]]
name = "_integrator_bench"
path = "examples/_integrator_bench.rs"

[[example]]
name = "_integrator_breakdown"
path = "examples/_integrator_breakdown.rs"

[[example]]
name = "_kvm_warm_bench"
path = "examples/_kvm_warm_bench.rs"

[[example]]
name = "_mem_dedup_probe"
path = "examples/_mem_dedup_probe.rs"

[[example]]
name = "_mem_dedup_rss_probe"
path = "examples/_mem_dedup_rss_probe.rs"

[[example]]
name = "_nginx_rps_hold"
path = "examples/_nginx_rps_hold.rs"

[[example]]
name = "_one_shot_timing"
path = "examples/_one_shot_timing.rs"

[[example]]
name = "_parallel_spawn"
path = "examples/_parallel_spawn.rs"

[[example]]
name = "_perf_gate"
path = "examples/_perf_gate.rs"

[[example]]
name = "_pool_autoscale"
path = "examples/_pool_autoscale.rs"

[[example]]
name = "_pool_bench"
path = "examples/_pool_bench.rs"

[[example]]
name = "_pool_v0_4"
path = "examples/_pool_v0_4.rs"

[[example]]
name = "_pre_exec_compare"
path = "examples/_pre_exec_compare.rs"

[[example]]
name = "_sanity_1vcpu"
path = "examples/_sanity_1vcpu.rs"

[[example]]
name = "_smpark_reliability_gate"
path = "examples/_smpark_reliability_gate.rs"

[[example]]
name = "_smpark_smoke"
path = "examples/_smpark_smoke.rs"

[[example]]
name = "_snapshot_smoke"
path = "examples/_snapshot_smoke.rs"

[[example]]
name = "_stage_diag"
path = "examples/_stage_diag.rs"

[[example]]
name = "_stage_exec_smoke"
path = "examples/_stage_exec_smoke.rs"

[[example]]
name = "_stage_size_probe"
path = "examples/_stage_size_probe.rs"

[[example]]
name = "_timeout_debug"
path = "examples/_timeout_debug.rs"

[[example]]
name = "_tracing_demo"
path = "examples/_tracing_demo.rs"

[[example]]
name = "_typed_errors_smoke"
path = "examples/_typed_errors_smoke.rs"

[[example]]
name = "_vsock_rtt_probe"
path = "examples/_vsock_rtt_probe.rs"

[[example]]
name = "_warmup_timing"
path = "examples/_warmup_timing.rs"

[[example]]
name = "builder"
path = "examples/builder.rs"

[[example]]
name = "bundle_load"
path = "examples/bundle_load.rs"

[[example]]
name = "embed_simple"
path = "examples/embed_simple.rs"

[[example]]
name = "exec"
path = "examples/exec.rs"

[[example]]
name = "kvm_acquire"
path = "examples/kvm_acquire.rs"

[[example]]
name = "kvm_api"
path = "examples/kvm_api.rs"

[[example]]
name = "kvm_apk_debug"
path = "examples/kvm_apk_debug.rs"

[[example]]
name = "kvm_bake"
path = "examples/kvm_bake.rs"

[[example]]
name = "kvm_bake_auto"
path = "examples/kvm_bake_auto.rs"

[[example]]
name = "kvm_boot"
path = "examples/kvm_boot.rs"

[[example]]
name = "kvm_build"
path = "examples/kvm_build.rs"

[[example]]
name = "kvm_build_dockerfile"
path = "examples/kvm_build_dockerfile.rs"

[[example]]
name = "kvm_commit_density"
path = "examples/kvm_commit_density.rs"

[[example]]
name = "kvm_dax_density"
path = "examples/kvm_dax_density.rs"

[[example]]
name = "kvm_dax_kernel_probe"
path = "examples/kvm_dax_kernel_probe.rs"

[[example]]
name = "kvm_density_scale"
path = "examples/kvm_density_scale.rs"

[[example]]
name = "kvm_from_oci"
path = "examples/kvm_from_oci.rs"

[[example]]
name = "kvm_idle_pool"
path = "examples/kvm_idle_pool.rs"

[[example]]
name = "kvm_initramfs"
path = "examples/kvm_initramfs.rs"

[[example]]
name = "kvm_ksm_density"
path = "examples/kvm_ksm_density.rs"

[[example]]
name = "kvm_live_snapshot"
path = "examples/kvm_live_snapshot.rs"

[[example]]
name = "kvm_net"
path = "examples/kvm_net.rs"

[[example]]
name = "kvm_pool"
path = "examples/kvm_pool.rs"

[[example]]
name = "kvm_snapshot_diff"
path = "examples/kvm_snapshot_diff.rs"

[[example]]
name = "kvm_virtiofs"
path = "examples/kvm_virtiofs.rs"

[[example]]
name = "kvm_volume"
path = "examples/kvm_volume.rs"

[[example]]
name = "kvm_volume_snapshot"
path = "examples/kvm_volume_snapshot.rs"

[[example]]
name = "oci_simple"
path = "examples/oci_simple.rs"

[[example]]
name = "restore_latency"
path = "examples/restore_latency.rs"

[[example]]
name = "tcp_forward"
path = "examples/tcp_forward.rs"

[[example]]
name = "v02_surface"
path = "examples/v02_surface.rs"

[[example]]
name = "warm_pool"
path = "examples/warm_pool.rs"

[dependencies.backhand]
version = "0.23"
features = ["zstd"]
default-features = false

[dependencies.env_logger]
version = "0.11"

[dependencies.flate2]
version = "1"
features = ["rust_backend"]
default-features = false

[dependencies.libc]
version = "0.2"

[dependencies.log]
version = "0.4"

[dependencies.mimalloc]
version = "0.1"
default-features = false

[dependencies.mio]
version = "1"
features = [
    "net",
    "os-poll",
]

[dependencies.ring]
version = "0.17"

[dependencies.rustls]
version = "0.23"
features = [
    "std",
    "tls12",
    "ring",
    "aws-lc-rs",
]
default-features = false

[dependencies.rustls-pemfile]
version = "2"

[dependencies.ruzstd]
version = "^0.7"

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde_json]
version = "1.0"

[dependencies.supermachine-kernel]
version = "=0.7.68"

[dependencies.tar]
version = "0.4"
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "rt",
    "rt-multi-thread",
    "sync",
]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1"

[dependencies.webpki-roots]
version = "0.26"

[dev-dependencies.proptest]
version = "1"

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "time",
]
default-features = false

[dev-dependencies.tracing-flame]
version = "0.2"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
    "env-filter",
    "fmt",
]

[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies.kvm-bindings]
version = "0.13"

[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies.kvm-ioctls]
version = "0.23"

[target.'cfg(all(target_os = "linux", target_arch = "x86_64"))'.dependencies.vmm-sys-util]
version = "0.14"

[target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.dependencies.applevisor-sys]
version = "1.0"
features = ["macos-15-0"]

[target.'cfg(all(target_os = "macos", target_arch = "aarch64"))'.dependencies.vm-fdt]
version = "0.3"

[target."cfg(sm_loom)".dev-dependencies.loom]
version = "0.7"

[lints.clippy]
assertions_on_constants = "allow"
comparison_chain = "allow"
doc_lazy_continuation = "allow"
duplicated_attributes = "allow"
field_reassign_with_default = "allow"
format_collect = "allow"
items_after_test_module = "allow"
len_without_is_empty = "allow"
needless_doctest_main = "allow"
needless_range_loop = "allow"
too_many_arguments = "allow"
type_complexity = "allow"
while_let_loop = "allow"

[lints.rust]
unsafe_op_in_unsafe_fn = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(sm_loom)"]
