Cargo.toml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [package]
  2. name = "dragonos_kernel"
  3. version = "0.1.10"
  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 = ["crates/*"]
  10. [features]
  11. default = ["fatfs", "kvm", "fatfs-secure", "static_keys_test"]
  12. # kvm
  13. kvm = []
  14. fatfs = []
  15. fatfs-secure = ["fatfs"]
  16. driver_ps2_mouse = []
  17. # kprobe
  18. kprobe_test = []
  19. static_keys_test = []
  20. # 运行时依赖项
  21. [dependencies]
  22. acpi = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/acpi-rs.git", rev = "282df2af7b" }
  23. asm_macros = { path = "crates/asm_macros" }
  24. atomic_enum = "=0.2.0"
  25. bit_field = "=0.10"
  26. bitfield-struct = "=0.5.3"
  27. bitflags = "=1.3.2"
  28. bitmap = { path = "crates/bitmap" }
  29. driver_base_macros = { "path" = "crates/driver_base_macros" }
  30. elf = { version = "=0.7.2", default-features = false }
  31. fdt = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/fdt", rev = "9862813020" }
  32. # 一个no_std的hashmap、hashset
  33. hashbrown = "=0.13.2"
  34. ida = { path = "crates/ida" }
  35. intertrait = { path = "crates/intertrait" }
  36. kcmdline_macros = { path = "crates/kcmdline_macros" }
  37. kdepends = { path = "crates/kdepends" }
  38. klog_types = { path = "crates/klog_types" }
  39. linkme = "=0.3.27"
  40. num = { version = "=0.4.0", default-features = false }
  41. num-derive = "=0.3"
  42. num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev = "1597c1c", default-features = false }
  43. smoltcp = { version = "=0.11.0", default-features = false, features = [
  44. "log",
  45. "alloc",
  46. "socket-raw",
  47. "socket-udp",
  48. "socket-tcp",
  49. "socket-icmp",
  50. "socket-dhcpv4",
  51. "socket-dns",
  52. "proto-ipv4",
  53. "proto-ipv6",
  54. ] }
  55. system_error = { path = "crates/system_error" }
  56. uefi = { version = "=0.26.0", features = ["alloc"] }
  57. uefi-raw = "=0.5.0"
  58. unified-init = { path = "crates/unified-init" }
  59. virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers", rev = "415ab38ff9" }
  60. wait_queue_macros = { path = "crates/wait_queue_macros" }
  61. paste = "=1.0.14"
  62. slabmalloc = { path = "crates/rust-slabmalloc" }
  63. log = "0.4.21"
  64. kprobe = { path = "crates/kprobe" }
  65. lru = "0.12.3"
  66. rbpf = { path = "crates/rbpf" }
  67. printf-compat = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/printf-compat", rev = "5f5c9cc363", default-features = false }
  68. static-keys = { version = "=0.7" }
  69. defer = "0.2.1"
  70. cfg-if = { version = "1.0.0" }
  71. derive_builder = { version = "0.20.2", default-features = false, features = ["alloc"] }
  72. # target为x86_64时,使用下面的依赖
  73. [target.'cfg(target_arch = "x86_64")'.dependencies]
  74. multiboot2 = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/multiboot2", rev = "05739aab40" }
  75. raw-cpuid = "11.0.1"
  76. x86 = "=0.52.0"
  77. x86_64 = "=0.14.10"
  78. # target为riscv64时,使用下面的依赖
  79. [target.'cfg(target_arch = "riscv64")'.dependencies]
  80. riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [
  81. "s-mode",
  82. ] }
  83. sbi-rt = { version = "=0.0.3", features = ["legacy"] }
  84. # target为loongarch64时,使用下面的依赖
  85. [target.'cfg(target_arch = "loongarch64")'.dependencies]
  86. loongArch64 = "=0.2.5"
  87. # 由于unwinding库不支持loongarch64架构,因此需要排除该依赖项
  88. [target.'cfg(not(target_arch = "loongarch64"))'.dependencies]
  89. unwinding = { version = "=0.2.3", default-features = false, features = [
  90. "unwinder",
  91. "fde-gnu-eh-frame-hdr",
  92. "panic",
  93. "personality",
  94. ] }
  95. # 构建时依赖项
  96. [build-dependencies]
  97. kernel_build = { path = "../build-scripts/kernel_build" }
  98. [dependencies.lazy_static]
  99. version = "=1.4.0"
  100. # 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
  101. features = ["spin_no_std"]
  102. # The development profile, used for `cargo build`
  103. [profile.dev]
  104. # opt-level = 0 # Controls the --opt-level the compiler builds with
  105. debug = true # Controls whether the compiler passes `-g`
  106. # The release profile, used for `cargo build --release`
  107. [profile.release]
  108. debug = false