Cargo.toml 3.6 KB

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