Cargo.toml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. syscall_table_macros = { path = "crates/syscall_table_macros" }
  56. system_error = { path = "crates/system_error" }
  57. uefi = { version = "=0.26.0", features = ["alloc"] }
  58. uefi-raw = "=0.5.0"
  59. unified-init = { path = "crates/unified-init" }
  60. virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers", rev = "415ab38ff9" }
  61. wait_queue_macros = { path = "crates/wait_queue_macros" }
  62. paste = "=1.0.14"
  63. slabmalloc = { path = "crates/rust-slabmalloc" }
  64. log = "0.4.21"
  65. kprobe = { path = "crates/kprobe" }
  66. lru = "0.12.3"
  67. rbpf = { path = "crates/rbpf" }
  68. printf-compat = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/printf-compat", rev = "5f5c9cc363", default-features = false }
  69. static-keys = { version = "=0.7" }
  70. defer = "0.2.1"
  71. cfg-if = { version = "1.0.0" }
  72. derive_builder = { version = "0.20.2", default-features = false, features = ["alloc"] }
  73. # target为x86_64时,使用下面的依赖
  74. [target.'cfg(target_arch = "x86_64")'.dependencies]
  75. multiboot2 = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/multiboot2", rev = "05739aab40" }
  76. raw-cpuid = "11.0.1"
  77. x86 = "=0.52.0"
  78. x86_64 = "=0.14.10"
  79. # target为riscv64时,使用下面的依赖
  80. [target.'cfg(target_arch = "riscv64")'.dependencies]
  81. riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [
  82. "s-mode",
  83. ] }
  84. sbi-rt = { version = "=0.0.3", features = ["legacy"] }
  85. # target为loongarch64时,使用下面的依赖
  86. [target.'cfg(target_arch = "loongarch64")'.dependencies]
  87. loongArch64 = "=0.2.5"
  88. # 由于unwinding库不支持loongarch64架构,因此需要排除该依赖项
  89. [target.'cfg(not(target_arch = "loongarch64"))'.dependencies]
  90. unwinding = { version = "=0.2.3", default-features = false, features = [
  91. "unwinder",
  92. "fde-gnu-eh-frame-hdr",
  93. "panic",
  94. "personality",
  95. ] }
  96. # 构建时依赖项
  97. [build-dependencies]
  98. kernel_build = { path = "../build-scripts/kernel_build" }
  99. [dependencies.lazy_static]
  100. version = "=1.4.0"
  101. # 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
  102. features = ["spin_no_std"]
  103. # The development profile, used for `cargo build`
  104. [profile.dev]
  105. # opt-level = 0 # Controls the --opt-level the compiler builds with
  106. debug = true # Controls whether the compiler passes `-g`
  107. # The release profile, used for `cargo build --release`
  108. [profile.release]
  109. debug = false