xref: /DragonOS/kernel/Cargo.toml (revision 83ed0ebc293d5a10245089f627f52770fd5b9dd4)
1[package]
2name = "dragonos_kernel"
3version = "0.1.0"
4edition = "2021"
5
6# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
8
9[lib]
10crate-type = ["staticlib"]
11
12[workspace]
13members = [
14    "crates/*",
15    "src/libs/intertrait"
16]
17
18[features]
19default = ["backtrace"]
20# 内核栈回溯
21backtrace = []
22
23
24# 运行时依赖项
25[dependencies]
26bit_field = "0.10"
27bitflags = "1.3.2"
28bitfield-struct = "0.5.3"
29virtio-drivers = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" }
30smoltcp = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/smoltcp.git", rev = "9027825", default-features = false, features = ["log", "alloc",  "socket-raw", "socket-udp", "socket-tcp", "socket-icmp", "socket-dhcpv4", "socket-dns", "proto-ipv4", "proto-ipv6"]}
31# num-traits 0.2.15
32num-traits = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false }
33num = { version = "0.4.0", default-features = false }
34num-derive = "0.3"
35# 一个no_std的hashmap、hashset
36hashbrown = "0.13.2"
37elf = { version = "0.7.2", default-features = false }
38atomic_enum = "0.2.0"
39raw-cpuid = "11.0.1"
40acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" }
41intertrait = { path = "src/libs/intertrait" }
42linkme = "0.2"
43ida = { path = "src/libs/ida" }
44klog_types = { path = "crates/klog_types" }
45kdepends = { path = "crates/kdepends" }
46
47# target为x86_64时,使用下面的依赖
48[target.'cfg(target_arch = "x86_64")'.dependencies]
49x86 = "0.52.0"
50x86_64 = "0.14.10"
51mini-backtrace = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/mini-backtrace.git", rev = "ba98506685" }
52
53
54# 构建时依赖项
55[build-dependencies]
56kernel_build = { path = "../build-scripts/kernel_build" }
57
58[dependencies.lazy_static]
59version = "1.4.0"
60# 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
61features = ["spin_no_std"]
62
63# The development profile, used for `cargo build`
64[profile.dev]
65# opt-level = 0  # Controls the --opt-level the compiler builds with
66debug = true   # Controls whether the compiler passes `-g`
67
68# The release profile, used for `cargo build --release`
69[profile.release]
70debug = false
71