zCore/kernel-hal/Cargo.toml

89 lines
2.4 KiB
TOML

[package]
name = "kernel-hal"
version = "0.1.0"
authors = [
"Runji Wang <wangrunji0408@163.com>",
"Yuekai Jia <equation618@gmail.com>",
]
edition = "2018"
description = "Kernel HAL interface definations."
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["libos"]
libos = [
"nix",
"tempfile",
"async-std",
"bitmap-allocator",
"zcore-drivers/mock",
]
graphic = ["zcore-drivers/graphic"]
board-d1 = ["zcore-drivers/board-d1"]
board-visionfive = ["zcore-drivers/board-visionfive"]
board-fu740 = ["zcore-drivers/board-fu740"]
link-user-img = []
loopback = ["zcore-drivers/loopback"]
[dependencies]
log = "0.4"
spin = "0.9"
cfg-if = "1.0"
bitflags = "1.3"
trapframe = "0.9.0"
git-version = "0.3"
numeric-enum-macro = "0.2"
lazy_static = { version = "1.4", features = ["spin_no_std"] }
zcore-drivers = { path = "../drivers", features = ["virtio"] }
lock = { git = "https://github.com/DeathWish5/kernel-sync", rev = "8486b8" }
smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "35e833e3", default-features = false, features = [
"log",
"alloc",
"verbose",
"proto-ipv4",
"proto-ipv6",
"proto-igmp",
"medium-ip",
"medium-ethernet",
"socket-raw",
"socket-udp",
"socket-tcp",
"socket-icmp",
"async",
] }
# LibOS mode
[target.'cfg(not(target_os = "none"))'.dependencies]
nix = { version = "0.23", optional = true }
tempfile = { version = "3", optional = true }
async-std = { version = "1.10", optional = true }
bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator.git", rev = "88e871a5", optional = true }
# Bare-metal mode
[target.'cfg(target_os = "none")'.dependencies]
naive-timer = "0.2.0"
executor = { git = "https://github.com/DeathWish5/PreemptiveScheduler", rev = "e8cd353" }
# For riscv
[target.'cfg(any(target_arch = "riscv32", target_arch = "riscv64"))'.dependencies]
riscv = "0.8"
sbi-rt = { git = "https://github.com/rustsbi/sbi-rt.git", rev = "2933f8d" }
# For x86_64
[target.'cfg(target_arch = "x86_64")'.dependencies]
x86 = "0.46"
x86_64 = "0.14"
# For aarch64
[target.'cfg(target_arch = "aarch64")'.dependencies]
tock-registers = "0.7"
cortex-a = "7.2.0"
# Bare-metal mode on x86_64
[target.'cfg(all(target_os = "none", target_arch = "x86_64"))'.dependencies]
uefi = "0.16"
raw-cpuid = "9.0"
x86-smpboot = { git = "https://github.com/rcore-os/x86-smpboot", rev = "1069df3" }
x2apic = "0.4"