Cargo.toml 3.5 KB

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