Cargo.toml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. [package]
  2. name = "dragonos_kernel"
  3. version = "0.1.0"
  4. edition = "2021"
  5. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  6. [lib]
  7. crate-type = ["staticlib"]
  8. [workspace]
  9. members = [
  10. "crates/*",
  11. "src/libs/intertrait"
  12. ]
  13. [features]
  14. default = ["backtrace"]
  15. # 内核栈回溯
  16. backtrace = []
  17. # 运行时依赖项
  18. [dependencies]
  19. acpi = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" }
  20. atomic_enum = "0.2.0"
  21. bit_field = "0.10"
  22. bitfield-struct = "0.5.3"
  23. bitflags = "1.3.2"
  24. bitmap = { path = "crates/bitmap" }
  25. # 一个no_std的hashmap、hashset
  26. elf = { version = "0.7.2", default-features = false }
  27. hashbrown = "0.13.2"
  28. ida = { path = "src/libs/ida" }
  29. intertrait = { path = "src/libs/intertrait" }
  30. kdepends = { path = "crates/kdepends" }
  31. klog_types = { path = "crates/klog_types" }
  32. linkme = "0.2"
  33. num = { version = "0.4.0", default-features = false }
  34. num-derive = "0.3"
  35. num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false }
  36. raw-cpuid = "11.0.1"
  37. smoltcp = { 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"]}
  38. system_error = { path = "crates/system_error" }
  39. unified-init = { path = "crates/unified-init" }
  40. virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" }
  41. fdt = "0.1.5"
  42. uefi = { version = "0.26.0", features = ["alloc"] }
  43. uefi-raw = "0.5.0"
  44. # target为x86_64时,使用下面的依赖
  45. [target.'cfg(target_arch = "x86_64")'.dependencies]
  46. mini-backtrace = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/mini-backtrace.git", rev = "e0b1d90940" }
  47. x86 = "0.52.0"
  48. x86_64 = "0.14.10"
  49. # target为riscv64时,使用下面的依赖
  50. [target.'cfg(target_arch = "riscv64")'.dependencies]
  51. riscv = { version = "0.11.0", features = [ "s-mode" ] }
  52. # 构建时依赖项
  53. [build-dependencies]
  54. kernel_build = { path = "../build-scripts/kernel_build" }
  55. [dependencies.lazy_static]
  56. version = "1.4.0"
  57. # 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
  58. features = ["spin_no_std"]
  59. # The development profile, used for `cargo build`
  60. [profile.dev]
  61. # opt-level = 0 # Controls the --opt-level the compiler builds with
  62. debug = true # Controls whether the compiler passes `-g`
  63. # The release profile, used for `cargo build --release`
  64. [profile.release]
  65. debug = false