[package]
name = "axvisor"
authors = ["Keyang Hu <keyang.hu@qq.com>", "周睿 <zrufo747@outlook.com>"]
edition.workspace = true
version = "0.5.16"
description = "A lightweight type-1 hypervisor based on ArceOS"
repository = "https://github.com/arceos-hypervisor/axvisor"
homepage = "https://github.com/arceos-hypervisor/axvisor"
documentation = "https://docs.rs/axvisor"
readme = "README.md"
keywords = ["hypervisor", "virtualization", "arceos", "type-1"]
categories = ["os", "no-std", "embedded"]
license = "Apache-2.0"
include = [
    ".cargo/config.toml",
    ".github/*/**",
    "doc/**",
    "src/**",
    "build.rs",
    "configs/**",
    "scripts/**",
    "xtask/src/**",
    "README.md",
    "LICENSE*",
]

[[bin]]
name = "axvisor"
path = "src/main.rs"

[[bin]]
name = "xtask"
path = "xtask/src/main.rs"
test = false

[[test]]
name = "axtest"
path = "tests/axtest.rs"
harness = false
required-features = ["axtest"]

[features]
default = []
axtest = []
ept-level-4 = ["axvm/4-level-ept"]
fs = ["ax-std/ext4fs", "ax-std/fatfs", "axvm/host-fs"]
vmx = ["axvm/vmx"]
svm = ["axvm/svm"]
sstc = ["axvm/sstc"]
rockchip-soc = ["ax-driver/rockchip-soc"]
rockchip-sdhci = ["ax-driver/rockchip-sdhci", "ax-driver/rockchip-soc"]
rockchip-dwmmc = ["ax-driver/rockchip-dwmmc", "ax-driver/rockchip-soc"]
phytium-mci = ["ax-driver/phytium-mci"]
sdmmc = [
    "ax-driver/rockchip-sdhci",
    "ax-driver/rockchip-soc",
    "ax-driver/phytium-mci",
]
rockchip-pm = ["ax-driver/rockchip-pm"]
stack-protector = ["ax-std/stack-protector"]

[dependencies]
spin = { workspace = true }

[target.'cfg(any(not(any(windows, unix)), target_env = "musl"))'.dependencies]
log = "0.4"

# System dependent modules provided by ArceOS.
ax-std = { workspace = true, features = ["ext-ld", "paging", "irq", "multitask", "task-ext", "smp", "hv", "plat-dyn"] }
ax-hal = { workspace = true, features = ["paging", "irq", "smp", "hv", "axvisor-linker"] }
# System dependent modules provided by ArceOS-Hypervisor (bare-metal only)
# ax-runtime = { version = "=0.3.0-preview.1", features = ["alloc", "irq", "paging", "smp", "multitask"] }
axvm = { workspace = true, default-features = false, features = ["plat-dyn"] }
axvmconfig = { workspace = true, default-features = false }
# System independent crates provided by ArceOS
ax-errno = { workspace = true }
ax-driver.workspace = true

[dev-dependencies]
axtest.workspace = true

# xtask dependencies (only used on host platforms)
[target.'cfg(any(windows, all(unix, not(target_env = "musl"))))'.dependencies]
anyhow.workspace = true
axbuild = { workspace = true }
clap = { version = "4.6", features = ["derive"] }
tokio = { version = "1", features = ["full"] }

[build-dependencies]
anyhow = "1.0"
prettyplease = "0.2"
proc-macro2 = "1.0"
quote = "1.0"
syn = "2.0"
toml = "0.9"
