xref: /DragonOS/kernel/Cargo.toml (revision 70a4e5550a9fb49b537092287c3ddc36448c5b78)
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 = [ "src/libs/intertrait" ]
14
15[features]
16default = ["backtrace"]
17# 内核栈回溯
18backtrace = []
19
20# 运行时依赖项
21[dependencies]
22x86 = "0.52.0"
23x86_64 = "0.14.10"
24bit_field = "0.10"
25bitflags = "1.3.2"
26bitfield-struct = "0.5.3"
27virtio-drivers = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/virtio-drivers.git", rev = "f1d1cbb" }
28# 一个无锁MPSC队列
29thingbuf = { version = "0.1.3", default-features = false, features = ["alloc"] }
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 }
38memoffset = "0.9.0"
39atomic_enum = "0.2.0"
40raw-cpuid = "11.0.1"
41acpi = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/acpi-rs.git", rev = "fb69243dcf" }
42intertrait = { path = "src/libs/intertrait" }
43linkme = "0.2"
44ida = { path = "src/libs/ida" }
45mini-backtrace = { git = "https://git.mirrors.dragonos.org/DragonOS-Community/mini-backtrace.git", rev = "ba98506685" }
46
47# 构建时依赖项
48[build-dependencies]
49bindgen = "0.61.0"
50cc = { version = "1.0.83", features = ["parallel"] }
51
52[dependencies.lazy_static]
53version = "1.4.0"
54# 由于在no_std环境,而lazy_static依赖了spin库,因此需要指定其使用no_std
55features = ["spin_no_std"]
56
57# The development profile, used for `cargo build`
58[profile.dev]
59# opt-level = 0  # Controls the --opt-level the compiler builds with
60debug = true   # Controls whether the compiler passes `-g`
61
62# The release profile, used for `cargo build --release`
63[profile.release]
64debug = false