-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
120 lines (98 loc) · 3.05 KB
/
Cargo.toml
File metadata and controls
120 lines (98 loc) · 3.05 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
112
113
114
115
116
117
118
119
120
[package]
name = "realtime-core"
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
authors = ["Equilibrium Tokens Team"]
description = "Deterministic timing primitives for real-time systems"
license = "MIT"
repository = "https://github.com/equilibrium-tokens/realtime-core"
readme = "README.md"
keywords = ["realtime", "timing", "preempt-rt", "io-uring", "scheduler"]
categories = ["asynchronous", "concurrency", "os::linux-apis", "development-tools::profiling"]
[features]
default = ["tokio", "timerfd"]
# Enable PREEMPT_RT support (requires Linux 6.12+)
preempt-rt = ["libc", "nix"]
# Enable io_uring backend (requires Linux 5.1+)
io-uring = ["tokio-uring", "libc"]
# Enable timerfd backend (fallback)
timerfd = ["libc", "nix"]
# Enable SCHED_DEADLINE support
deadline = ["preempt-rt"]
# Full feature set for maximum performance
full = ["preempt-rt", "io-uring", "deadline"]
# Development/testing features
testing = ["mock-timer"]
# Mock timer for testing without real-time hardware
mock-timer = []
[dependencies]
# Async runtime
tokio = { version = "1.35", features = ["time", "sync", "rt", "rt-multi-thread", "macros"], optional = true }
tokio-uring = { version = "0.5", optional = true }
# System utilities
num_cpus = "1.16"
# System calls
libc = { version = "0.2", optional = true }
nix = { version = "0.28", features = ["time", "sched", "feature"], optional = true }
# Error handling
thiserror = "1.0"
anyhow = "1.0"
# Logging
tracing = { version = "0.1", features = ["log"] }
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Serialization (for cross-language IPC)
serde = { version = "1.0", features = ["derive"], optional = true }
# Metrics (for performance monitoring)
metrics = { version = "0.23", optional = true }
[dev-dependencies]
# Testing
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1.4"
tempfile = "3.8"
# Benchmarking
pprof = { version = "0.13", features = ["flamegraph", "criterion"] }
# Mocking
mockall = "0.12"
[lib]
name = "realtime_core"
path = "src/lib.rs"
# Examples (TODO: Create these files)
# [[example]]
# name = "basic_timer"
# path = "examples/basic_timer.rs"
# [[example]]
# name = "rate_control"
# path = "examples/rate_control.rs"
# [[example]]
# name = "cpu_isolation"
# path = "examples/cpu_isolation.rs"
# [[example]]
# name = "io_uring_timer"
# path = "examples/io_uring_timer.rs"
# required-features = ["io-uring"]
# [[example]]
# name = "equilibrium_integration"
# path = "examples/equilibrium_integration.rs"
# Benchmarks (TODO: Create these files)
# [[bench]]
# name = "timer_jitter"
# harness = false
# [[bench]]
# name = "scheduling_overhead"
# harness = false
[profile.release]
# Optimize for performance
opt-level = 3
lto = "fat"
codegen-units = 1
panic = "abort"
strip = true
[profile.bench]
inherits = "release"
debug = true
[package.metadata.docs.rs]
# Build docs with all features
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
targets = ["x86_64-unknown-linux-gnu"]