1[package] 2name = "dragonos_kernel" 3version = "0.1.0" 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 "src/libs/intertrait" 16] 17 18[features] 19default = ["backtrace"] 20# 内核栈回溯 21backtrace = [] 22 23 24# 运行时依赖项 25[dependencies] 26acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" } 27atomic_enum = "0.2.0" 28bit_field = "0.10" 29bitflags = "1.3.2" 30bitfield-struct = "0.5.3" 31# 一个no_std的hashmap、hashset 32elf = { version = "0.7.2", default-features = false } 33hashbrown = "0.13.2" 34ida = { path = "src/libs/ida" } 35intertrait = { path = "src/libs/intertrait" } 36kdepends = { path = "crates/kdepends" } 37klog_types = { path = "crates/klog_types" } 38linkme = "0.2" 39num = { version = "0.4.0", default-features = false } 40num-derive = "0.3" 41num-traits = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false } 42raw-cpuid = "11.0.1" 43smoltcp = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/smoltcp.git", rev = "9027825", default-features = false, features = ["log", "alloc", "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]} 44system_error = { path = "crates/system_error" } 45unified-init = { path = "crates/unified-init" } 46virtio-drivers = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" } 47fdt = "0.1.5" 48 49# target为x86_64时,使用下面的依赖 50[target.'cfg(target_arch = "x86_64")'.dependencies] 51mini-backtrace = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/mini-backtrace.git", rev = "ba98506685" } 52x86 = "0.52.0" 53x86_64 = "0.14.10" 54 55 56# target为riscv64时,使用下面的依赖 57[target.'cfg(target_arch = "riscv64")'.dependencies] 58 59 60 61# 构建时依赖项 62[build-dependencies] 63kernel_build = { path = "../build-scripts/kernel_build" } 64 65[dependencies.lazy_static] 66version = "1.4.0" 67# 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std 68features = ["spin_no_std"] 69 70# The development profile, used for `cargo build` 71[profile.dev] 72# opt-level = 0 # Controls the --opt-level the compiler builds with 73debug = true # Controls whether the compiler passes `-g` 74 75# The release profile, used for `cargo build --release` 76[profile.release] 77debug = false 78