[package]
name = "ostd"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
align_ext = { path = "libs/align_ext" }
ostd-macros = { path = "libs/ostd-macros" }
bit_field = "0.10.1"
bitflags = "1.3"
bitvec = { version = "1.0", default-features = false, features = ["alloc"] }
linux-boot-params = { path = "libs/linux-bzimage/boot-params" }
buddy_system_allocator = "0.9.0"
cfg-if = "1.0"
gimli = { version = "0.28", default-features = false, features = ["read-core"] }
inherit-methods-macro = { git = "https://github.com/asterinas/inherit-methods-macro", rev = "98f7e3e" }
xarray = { git = "https://github.com/asterinas/xarray", rev = "72a4067" }
int-to-c-enum = { path = "../kernel/libs/int-to-c-enum" }
# instrusive-collections of version 0.9.6 fails to compile with current rust toolchain,
# So we set a fixed version 0.9.5 for this crate
intrusive-collections = { version = "=0.9.5", features = ["nightly"] }
array-init = "2.0"
ktest = { path = "libs/ktest" }
id-alloc = { path = "libs/id-alloc" }
lazy_static = { version = "1.0", features = ["spin_no_std"] }
log = "0.4"
num = { version = "0.4", default-features = false }
num-derive = { version = "0.4", default-features = false }
num-traits = { version = "0.2", default-features = false }
pod = { git = "https://github.com/asterinas/pod", rev = "d7dba56" }
spin = "0.9.4"
static_assertions = "1.1.0"
tdx-guest = { version = "0.1.0", optional = true }
trapframe = { git = "https://github.com/asterinas/trapframe-rs", rev = "4739428" }
# This version is in the upstream trunk branch which fixes a `r#try` usage.
# We could switch back to "crates.io" when they publish a new version.
unwinding = { git = "https://github.com/nbdd0121/unwinding.git", rev = "d7cd46e", default-features = false, features = ["fde-gnu-eh-frame-hdr", "hide-trace", "panic", "personality", "unwinder"] }
volatile = { version = "0.4.5", features = ["unstable"] }

[target.x86_64-unknown-none.dependencies]
x86_64 = "0.14.2"
x86 = "0.52.0"
acpi = "4.1.1"
aml = "0.16.3"
multiboot2 = "0.20.2"
rsdp = "2.0.0"
iced-x86 = { version = "1.21.0", default-features = false, features = [ "no_std", "decoder", "gas" ], optional = true }

[features]
intel_tdx = ["dep:tdx-guest", "dep:iced-x86"]
