Cargo.toml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. [package]
  2. name = "dragonos_kernel"
  3. version = "0.1.9"
  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. "src/libs/intertrait"
  12. ]
  13. [features]
  14. default = ["backtrace", "kvm"]
  15. # 内核栈回溯
  16. backtrace = []
  17. # kvm
  18. kvm = []
  19. # 运行时依赖项
  20. [dependencies]
  21. acpi = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" }
  22. asm_macros = { path = "crates/asm_macros" }
  23. atomic_enum = "=0.2.0"
  24. bit_field = "=0.10"
  25. bitfield-struct = "=0.5.3"
  26. bitflags = "=1.3.2"
  27. bitmap = { path = "crates/bitmap" }
  28. driver_base_macros = { "path" = "crates/driver_base_macros" }
  29. # 一个no_std的hashmap、hashset
  30. elf = { version = "=0.7.2", default-features = false }
  31. hashbrown = "=0.13.2"
  32. ida = { path = "src/libs/ida" }
  33. intertrait = { path = "src/libs/intertrait" }
  34. kdepends = { path = "crates/kdepends" }
  35. klog_types = { path = "crates/klog_types" }
  36. linkme = "=0.2"
  37. num = { version = "=0.4.0", default-features = false }
  38. num-derive = "=0.3"
  39. num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false }
  40. 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"]}
  41. system_error = { path = "crates/system_error" }
  42. unified-init = { path = "crates/unified-init" }
  43. virtio-drivers = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/virtio-drivers", rev = "f91c807965" }
  44. fdt = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/fdt", rev = "9862813020" }
  45. uefi = { version = "=0.26.0", features = ["alloc"] }
  46. uefi-raw = "=0.5.0"
  47. paste = "=1.0.14"
  48. slabmalloc = { path = "crates/rust-slabmalloc" }
  49. log = "0.4.21"
  50. # target为x86_64时,使用下面的依赖
  51. [target.'cfg(target_arch = "x86_64")'.dependencies]
  52. mini-backtrace = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/mini-backtrace.git", rev = "e0b1d90940" }
  53. raw-cpuid = "11.0.1"
  54. x86 = "=0.52.0"
  55. x86_64 = "=0.14.10"
  56. # target为riscv64时,使用下面的依赖
  57. [target.'cfg(target_arch = "riscv64")'.dependencies]
  58. riscv = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/riscv.git", rev = "4241a97", features = [ "s-mode" ] }
  59. sbi-rt = { version = "=0.0.3", features = ["legacy"] }
  60. # 构建时依赖项
  61. [build-dependencies]
  62. kernel_build = { path = "../build-scripts/kernel_build" }
  63. [dependencies.lazy_static]
  64. version = "=1.4.0"
  65. # 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
  66. features = ["spin_no_std"]
  67. # The development profile, used for `cargo build`
  68. [profile.dev]
  69. # opt-level = 0 # Controls the --opt-level the compiler builds with
  70. debug = true # Controls whether the compiler passes `-g`
  71. # The release profile, used for `cargo build --release`
  72. [profile.release]
  73. debug = false