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