-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
111 lines (103 loc) · 3.25 KB
/
Cargo.toml
File metadata and controls
111 lines (103 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[package]
name = "arceos-guestmode"
version = "0.4.6"
edition = "2024"
authors = [
"Lei Shi <shi_lei@massclouds.com>",
"Yu Chen <yuchen@tsinghua.edu.cn>",
]
description = "ArceOS Guest Mode (Hypervisor): runs a minimal guest OS (skernel) using hardware-assisted virtualization — RISC-V H-extension, ARM AArch64 EL2, and AMD SVM — with VM exit handling and second-stage page table support"
homepage = "https://github.com/arceos-org/app-guestmode"
repository = "https://github.com/arceos-org/app-guestmode"
license = "GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0"
keywords = ["arceos", "hypervisor", "riscv", "aarch64", "x86_64"]
categories = ["os", "no-std"]
include = [
"src/**",
"build.rs",
"configs/**",
"payload/skernel/src/**",
"xtask/src/**",
".cargo/config.toml",
"rust-toolchain.toml",
"README.md",
"LICENSE*",
]
[features]
default = []
guest-kernel = []
axstd = [
"dep:axstd",
"dep:axfeat",
"dep:axfs",
"dep:axio",
"dep:axmm",
"dep:axhal",
"dep:axsync",
"dep:axtask",
"dep:axlog",
"dep:axerrno",
"dep:memory_addr",
"dep:memoffset",
"axstd/fs",
]
xtask = ["dep:clap", "dep:fatfs"]
[[bin]]
name = "xtask"
path = "xtask/src/main.rs"
required-features = ["xtask"]
[[bin]]
name = "skernel"
path = "payload/skernel/src/main.rs"
required-features = ["guest-kernel"]
[dependencies]
# ─── ArceOS crates (common, all architectures) ───
axstd = { version = "0.3.0-preview.1", features = [
"defplat",
"alloc",
"paging",
"multitask",
"sched-cfs",
"fs",
], optional = true }
# Enable FS init in axruntime (bypasses broken arceos_api/fs)
axfeat = { version = "0.3.0-preview.1", features = ["fs"], optional = true }
# Direct filesystem access API
axfs = { version = "0.3.0-preview.1", features = ["fat"], optional = true }
# I/O traits (Read, Write, Seek)
axio = { version = "0.3.0-pre.1", optional = true }
# Memory management - user address spaces
axmm = { version = "0.3.0-preview.1", features = ["copy"], optional = true }
# HAL - UserContext, paging, trap handling
axhal = { version = "0.3.0-preview.1", features = ["uspace"], optional = true }
# Synchronization primitives
axsync = { version = "0.3.0-preview.1", optional = true }
# Task management
axtask = { version = "0.3.0-preview.1", optional = true }
# Logging (ax_println!)
axlog = { version = "0.3.0-preview.1", optional = true }
# Error types
axerrno = { version = "0.1", optional = true }
# Address types
memory_addr = { version = "0.4", optional = true }
# Struct field offset computation (used by both riscv64 and aarch64 asm)
memoffset = { version = ">=0.6.5", features = [
"unstable_const",
], optional = true }
# ─── Xtask dependencies ───
clap = { version = "4", features = ["derive"], optional = true }
fatfs = { version = "0.3.6", optional = true }
# ─── RISC-V specific (only compiled when target_arch = riscv64) ───
[target.'cfg(target_arch = "riscv64")'.dependencies]
sbi-spec = { version = "0.0.6", features = ["legacy"] }
riscv = { version = "0.11" }
sbi-rt = { version = "0.0.2", features = ["integer-impls", "legacy"] }
tock-registers = { version = "0.8.1" }
[profile.release]
panic = "abort"
lto = true
codegen-units = 1
incremental = false
debug = true
[profile.dev]
panic = "abort"