Cargo.toml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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 = []
  16. # kvm
  17. kvm = []
  18. fatfs = []
  19. fatfs-secure = ["fatfs"]
  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. kdepends = { path = "crates/kdepends" }
  37. klog_types = { path = "crates/klog_types" }
  38. linkme = "=0.3.27"
  39. num = { version = "=0.4.0", default-features = false }
  40. num-derive = "=0.3"
  41. num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false }
  42. 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"]}
  43. system_error = { path = "crates/system_error" }
  44. uefi = { version = "=0.26.0", features = ["alloc"] }
  45. uefi-raw = "=0.5.0"
  46. unified-init = { path = "crates/unified-init" }
  47. virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers", rev = "f91c807965" }
  48. wait_queue_macros = { path = "crates/wait_queue_macros" }
  49. paste = "=1.0.14"
  50. slabmalloc = { path = "crates/rust-slabmalloc" }
  51. log = "0.4.21"
  52. lru = "0.12.3"
  53. # target为x86_64时,使用下面的依赖
  54. [target.'cfg(target_arch = "x86_64")'.dependencies]
  55. mini-backtrace = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/mini-backtrace.git", rev = "e0b1d90940" }
  56. multiboot2 = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/multiboot2", rev = "05739aab40" }
  57. raw-cpuid = "11.0.1"
  58. x86 = "=0.52.0"
  59. x86_64 = "=0.14.10"
  60. # target为riscv64时,使用下面的依赖
  61. [target.'cfg(target_arch = "riscv64")'.dependencies]
  62. riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [ "s-mode" ] }
  63. sbi-rt = { version = "=0.0.3", features = ["legacy"] }
  64. # 构建时依赖项
  65. [build-dependencies]
  66. kernel_build = { path = "../build-scripts/kernel_build" }
  67. [dependencies.lazy_static]
  68. version = "=1.4.0"
  69. # 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
  70. features = ["spin_no_std"]
  71. # The development profile, used for `cargo build`
  72. [profile.dev]
  73. # opt-level = 0 # Controls the --opt-level the compiler builds with
  74. debug = true # Controls whether the compiler passes `-g`
  75. # The release profile, used for `cargo build --release`
  76. [profile.release]
  77. debug = false