f1_nexus_core/
lib.rs

1//! F1 Nexus Core - Domain types and fundamental racing logic
2//!
3//! This crate provides the core data structures and business logic for F1 racing,
4//! including telemetry data, race state, strategy representation, and FIA regulations.
5
6pub mod telemetry;
7pub mod strategy;
8pub mod race;
9pub mod regulations;
10pub mod track;
11pub mod weather;
12pub mod tire;
13pub mod fuel;
14pub mod types;
15
16#[cfg(not(target_arch = "wasm32"))]
17pub mod api;
18
19pub use telemetry::*;
20pub use strategy::*;
21pub use race::*;
22pub use regulations::*;
23pub use track::*;
24pub use weather::*;
25pub use tire::*;
26pub use fuel::*;
27pub use types::*;
28
29#[cfg(not(target_arch = "wasm32"))]
30pub use api::*;
31
32/// F1 Nexus version
33pub const VERSION: &str = env!("CARGO_PKG_VERSION");
34
35/// Maximum number of laps in a typical F1 race
36pub const MAX_RACE_LAPS: u16 = 78; // Monaco 2024
37
38/// Number of cars on the grid
39pub const GRID_SIZE: u8 = 20;
40
41/// Mandatory pit stop count (2024+ regulations)
42pub const MANDATORY_PIT_STOPS: u8 = 1;
43
44/// Telemetry sampling rate (Hz)
45pub const TELEMETRY_HZ: u32 = 1000;
46
47#[cfg(test)]
48mod tests {
49    use super::*;
50
51    #[test]
52    fn test_version() {
53        assert!(!VERSION.is_empty());
54    }
55}