# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

[package]
name = "vmgs"
edition.workspace = true
rust-version.workspace = true

[features]
default = []

inspect = ["vmgs_format/inspect", "dep:inspect", "dep:inspect_counters"]
save_restore = ["dep:mesh_protobuf"]
mesh = ["dep:mesh_protobuf"]

# Use native windows crypto APIs
encryption_win = ["dep:windows", "dep:windows-result"]
# Use OpenSSL crypto APIs
encryption_ossl = ["dep:openssl"]

test_helpers = []

# run windows encryption unit tests in CI
ci = ["encryption_win"]

[dependencies]
disk_backend.workspace = true
guestmem.workspace = true
scsi_buffers.workspace = true
vmgs_format.workspace = true

inspect = { workspace = true, optional = true }
inspect_counters = { workspace = true, optional = true }
mesh_protobuf = { workspace = true, optional = true }
async-trait.workspace = true
cfg-if.workspace = true
crc32fast.workspace = true
getrandom.workspace = true
openssl = { optional = true, features = ["vendored"], workspace = true }
serde_json = { workspace = true, features = ["std"] }
thiserror.workspace = true
tracing.workspace = true
cvm_tracing.workspace = true
zerocopy.workspace = true
[target.'cfg(windows)'.dependencies.windows]
workspace = true
optional = true
features = [
  "Win32_Foundation",
  "Win32_Security_Cryptography",
]
[target.'cfg(windows)'.dependencies.windows-result]
workspace = true
optional = true

[dev-dependencies]
pal_async.workspace = true
disklayer_ram.workspace = true
parking_lot.workspace = true

[lints]
workspace = true
