125 lines
3.0 KiB
TOML
125 lines
3.0 KiB
TOML
[package]
|
||
name = "kernel"
|
||
version = "0.1.0"
|
||
edition = "2024"
|
||
build = "build.rs"
|
||
|
||
[lints.rust]
|
||
static_mut_refs = "allow"
|
||
[dependencies]
|
||
# Core API and types
|
||
nos-api = { workspace = true, default-features = false }
|
||
|
||
# Memory management
|
||
nos-memory-management = { workspace = true, default-features = false }
|
||
|
||
# System calls
|
||
nos-syscalls = { workspace = true, default-features = false, optional = true }
|
||
|
||
# Services
|
||
nos-services = { workspace = true, default-features = false, optional = true }
|
||
|
||
# Error handling
|
||
nos-error-handling = { workspace = true, default-features = false, optional = true }
|
||
|
||
# Dependencies from nos-kernel-core
|
||
bitflags = { workspace = true }
|
||
static_assertions = { workspace = true }
|
||
|
||
hashbrown = { workspace = true }
|
||
spin = { workspace = true }
|
||
log = { workspace = true }
|
||
|
||
# Heapless data structures for no_std environment
|
||
heapless = { version = "0.7", default-features = false }
|
||
|
||
# Math library for no_std environment
|
||
libm = "0.2.8"
|
||
|
||
# Test dependencies
|
||
[dev-dependencies]
|
||
criterion = { workspace = true, features = ["html_reports"] }
|
||
proptest = { workspace = true }
|
||
mockall = { workspace = true }
|
||
serde = { workspace = true }
|
||
serde_json = { workspace = true }
|
||
bincode = { workspace = true }
|
||
|
||
[features]
|
||
default = ["posix_layer", "net_stack", "syscalls", "services", "error_handling"]
|
||
baremetal = []
|
||
kernel_tests = []
|
||
link_phys_end = []
|
||
fast_syscall = []
|
||
zero_copy = []
|
||
batch_syscalls = []
|
||
net_opt = []
|
||
sched_opt = []
|
||
lazy_init = []
|
||
security_audit = []
|
||
formal_verification = []
|
||
observability = []
|
||
debug_subsystems = []
|
||
cloud_native = []
|
||
net_stack = []
|
||
graphics_subsystem = []
|
||
web_engine = []
|
||
posix_layer = []
|
||
|
||
hpage_2mb = []
|
||
hpage_1gb = []
|
||
debug = []
|
||
|
||
# New modular features
|
||
syscalls = ["nos-syscalls"]
|
||
services = ["nos-services"]
|
||
error_handling = ["nos-error-handling"]
|
||
advanced_syscalls = ["nos-syscalls/advanced_syscalls"]
|
||
realtime = []
|
||
log = []
|
||
|
||
# Features说明:
|
||
# baremetal: 裸机启动与汇编路径(global_asm/trap/context switch等),用于真实目标板或无操作系统环境
|
||
# kernel_tests: 开启内核自测入口与测试用例(run_tests/test_*),默认关闭以避免宿主编译干扰
|
||
|
||
# Profile configurations are moved to workspace root to avoid warnings
|
||
|
||
# Benchmark configuration
|
||
[[bench]]
|
||
name = "kernel_benchmarks"
|
||
harness = false
|
||
required-features = ["kernel_tests"]
|
||
|
||
[[bench]]
|
||
name = "process_management_bench"
|
||
harness = false
|
||
required-features = ["kernel_tests"]
|
||
|
||
[[bench]]
|
||
name = "comprehensive_benchmarks"
|
||
harness = false
|
||
required-features = ["kernel_tests"]
|
||
|
||
[[bench]]
|
||
name = "linux_comparison_bench"
|
||
harness = false
|
||
required-features = ["kernel_tests"]
|
||
|
||
[[bench]]
|
||
name = "syscall_optimization_bench"
|
||
path = "benches/syscall_optimization_bench.rs"
|
||
harness = false
|
||
required-features = ["kernel_tests"]
|
||
|
||
[[bench]]
|
||
name = "performance_benchmarks"
|
||
path = "benches/performance_benchmarks.rs"
|
||
harness = false
|
||
required-features = ["kernel_tests", "syscalls", "error_handling"]
|
||
|
||
# Fuzz testing configuration
|
||
[[bin]]
|
||
name = "fuzz_testing"
|
||
path = "src/fuzz_testing_main.rs"
|
||
required-features = ["kernel_tests"]
|