chore(m0): initialize cargo workspace, crate skeletons and ci gate
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "sim"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
authors.workspace = true
|
||||
description = "Deterministic artillery simulation core (fixed-point, no_std)"
|
||||
|
||||
[lib]
|
||||
crate-type = ["rlib"]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
serde = ["dep:serde", "dep:serde_json"]
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true, optional = true }
|
||||
serde_json = { workspace = true, optional = true }
|
||||
@@ -0,0 +1,19 @@
|
||||
//! Deterministic artillery simulation core.
|
||||
//!
|
||||
//! Rules (see docs/ADR/0002-determinismus-fixed-point.md):
|
||||
//! - no floating point arithmetic
|
||||
//! - no `HashMap`/`HashSet` iteration
|
||||
//! - no `std::time`, no threads, no `unsafe`
|
||||
//! - fixed 60 Hz tick
|
||||
#![cfg_attr(not(test), no_std)]
|
||||
#![forbid(unsafe_code)]
|
||||
#![deny(clippy::float_arithmetic)]
|
||||
|
||||
#[cfg(not(test))]
|
||||
extern crate alloc;
|
||||
|
||||
/// Version of the simulation. Bumped on any formula/balance change.
|
||||
pub const SIM_VERSION: &str = "0.1.0";
|
||||
|
||||
/// Fixed simulation tick rate in Hz.
|
||||
pub const TICK_HZ: u32 = 60;
|
||||
Reference in New Issue
Block a user