1[package] 2name = "dragonos_kernel" 3version = "0.1.10" 4edition = "2021" 5 6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 8 9[lib] 10crate-type = ["staticlib"] 11 12[workspace] 13members = [ 14 "crates/*", 15] 16 17[features] 18default = ["backtrace", "kvm", "fatfs", "fatfs-secure"] 19# 内核栈回溯 20backtrace = [] 21# kvm 22kvm = [] 23 24fatfs = [] 25fatfs-secure = ["fatfs"] 26 27 28# 运行时依赖项 29[dependencies] 30acpi = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" } 31asm_macros = { path = "crates/asm_macros" } 32atomic_enum = "=0.2.0" 33bit_field = "=0.10" 34bitfield-struct = "=0.5.3" 35bitflags = "=1.3.2" 36bitmap = { path = "crates/bitmap" } 37driver_base_macros = { "path" = "crates/driver_base_macros" } 38# 一个no_std的hashmap、hashset 39elf = { version = "=0.7.2", default-features = false } 40fdt = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/fdt", rev = "9862813020" } 41hashbrown = "=0.13.2" 42ida = { path = "src/libs/ida" } 43intertrait = { path = "crates/intertrait" } 44kdepends = { path = "crates/kdepends" } 45klog_types = { path = "crates/klog_types" } 46linkme = "=0.3.27" 47num = { version = "=0.4.0", default-features = false } 48num-derive = "=0.3" 49num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false } 50smoltcp = { version = "=0.11.0", default-features = false, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]} 51system_error = { path = "crates/system_error" } 52uefi = { version = "=0.26.0", features = ["alloc"] } 53uefi-raw = "=0.5.0" 54unified-init = { path = "crates/unified-init" } 55virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers", rev = "f91c807965" } 56wait_queue_macros = { path = "crates/wait_queue_macros" } 57paste = "=1.0.14" 58slabmalloc = { path = "crates/rust-slabmalloc" } 59log = "0.4.21" 60 61 62# target为x86_64时,使用下面的依赖 63[target.'cfg(target_arch = "x86_64")'.dependencies] 64mini-backtrace = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/mini-backtrace.git", rev = "e0b1d90940" } 65raw-cpuid = "11.0.1" 66x86 = "=0.52.0" 67x86_64 = "=0.14.10" 68 69# target为riscv64时,使用下面的依赖 70[target.'cfg(target_arch = "riscv64")'.dependencies] 71riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [ "s-mode" ] } 72sbi-rt = { version = "=0.0.3", features = ["legacy"] } 73 74 75# 构建时依赖项 76[build-dependencies] 77kernel_build = { path = "../build-scripts/kernel_build" } 78 79[dependencies.lazy_static] 80version = "=1.4.0" 81# 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std 82features = ["spin_no_std"] 83 84# The development profile, used for `cargo build` 85[profile.dev] 86# opt-level = 0 # Controls the --opt-level the compiler builds with 87debug = true # Controls whether the compiler passes `-g` 88 89# The release profile, used for `cargo build --release` 90[profile.release] 91debug = false 92