# 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 = "2024"
name = "arceos-guestmonolithickernel"
version = "0.4.5"
authors = [
    "Lei Shi <shi_lei@massclouds.com>",
    "Yu Chen <yuchen@tsinghua.edu.cn>",
]
build = "build.rs"
include = [
    "src/**",
    "build.rs",
    "configs/**",
    "payload/gkernel/src/**",
    "payload/gkernel/configs/**",
    "payload/gkernel/linker-*.ld",
    "xtask/src/**",
    ".cargo/config.toml",
    "rust-toolchain.toml",
    "README.md",
    "LICENSE*",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "ArceOS Guest Monolithic Kernel (Hypervisor): runs a guest monolithic OS kernel with user-space process support (task management, syscall handling, pflash passthrough) — RISC-V H-extension, ARM AArch64 EL2, and AMD SVM"
homepage = "https://github.com/arceos-org/app-guestmonolithickernel"
readme = "README.md"
keywords = [
    "arceos",
    "hypervisor",
    "riscv",
    "aarch64",
    "x86_64",
]
categories = [
    "os",
    "no-std",
]
license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0"
repository = "https://github.com/arceos-org/app-guestmonolithickernel"

[features]
axstd = ["dep:axstd"]
default = []
guest-kernel = [
    "axstd",
    "axstd/paging",
    "dep:axhal",
    "axstd/alloc",
    "dep:axmm",
]
hypervisor = [
    "axstd",
    "dep:axfeat",
    "dep:axfs",
    "dep:axio",
    "dep:axmm",
    "axhal/uspace",
    "dep:axsync",
    "dep:axtask",
    "dep:axlog",
    "dep:axerrno",
    "dep:memory_addr",
    "dep:memoffset",
]
xtask = [
    "dep:clap",
    "dep:fatfs",
]

[[bin]]
name = "arceos-guestmonolithickernel"
path = "src/main.rs"

[[bin]]
name = "gkernel"
path = "payload/gkernel/src/main.rs"
required-features = ["guest-kernel"]

[[bin]]
name = "xtask"
path = "xtask/src/main.rs"
required-features = ["xtask"]

[dependencies.axerrno]
version = "0.1"
optional = true

[dependencies.axfeat]
version = "0.2.2-preview.1"
features = [
    "fs",
    "fs-fat",
]
optional = true

[dependencies.axfs]
version = "0.2.2-preview.1"
features = ["fat"]
optional = true

[dependencies.axhal]
version = "0.2.2-preview.3"
optional = true

[dependencies.axio]
version = "0.3.0-pre.1"
optional = true

[dependencies.axlog]
version = "0.2.2-preview.1"
optional = true

[dependencies.axmm]
version = "0.2.2-preview.1"
features = ["copy"]
optional = true

[dependencies.axstd]
version = "0.2.2-preview.1"
features = [
    "defplat",
    "alloc",
    "paging",
    "multitask",
    "sched-cfs",
]
optional = true

[dependencies.axsync]
version = "0.2.2-preview.1"
optional = true

[dependencies.axtask]
version = "0.2.2-preview.3"
optional = true

[dependencies.clap]
version = "4"
features = ["derive"]
optional = true

[dependencies.fatfs]
version = "0.3.6"
optional = true

[dependencies.memoffset]
version = ">=0.6.5"
features = ["unstable_const"]
optional = true

[dependencies.memory_addr]
version = "0.4"
optional = true

[target.'cfg(not(target_arch = "x86_64"))'.dependencies.axhal]
version = "0.2.2-preview.3"
features = ["uspace"]
optional = true

[target.'cfg(target_arch = "riscv64")'.dependencies.riscv]
version = "0.11"

[target.'cfg(target_arch = "riscv64")'.dependencies.sbi-rt]
version = "0.0.2"
features = [
    "integer-impls",
    "legacy",
]

[target.'cfg(target_arch = "riscv64")'.dependencies.sbi-spec]
version = "0.0.6"
features = ["legacy"]

[target.'cfg(target_arch = "riscv64")'.dependencies.tock-registers]
version = "0.8.1"

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
