simular 0.2.0

Unified Simulation Engine for the Sovereign AI Stack
Documentation
[package]
name = "simular"
version = "0.2.0"
edition = "2021"
authors = ["PAIML Engineering"]
description = "Unified Simulation Engine for the Sovereign AI Stack"
license = "MIT"
repository = "https://github.com/paiml/simular"
keywords = ["simulation", "physics", "monte-carlo", "optimization", "reproducible"]
categories = ["simulation", "science", "mathematics"]

[dependencies]
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_yaml = "0.9"
bincode = "1.3"

# Validation
validator = { version = "0.20", features = ["derive"] }
thiserror = "2.0"
jsonschema = { version = "0.29", optional = true }

# Random number generation (deterministic)
rand = "0.8"
rand_pcg = { version = "0.3", features = ["serde1"] }

# Collections (deterministic)
indexmap = { version = "2.0", features = ["serde"] }

# Compression
zstd = "0.13"

# Hashing
blake3 = "1.5"

# Memory mapping
memmap2 = "0.9"

# Async runtime (for web visualization)
tokio = { version = "1.0", features = ["full"], optional = true }

# Web server (optional)
axum = { version = "0.7", features = ["ws"], optional = true }

# TUI (optional)
ratatui = { version = "0.29", optional = true }
crossterm = { version = "0.28", optional = true }

# WASM (optional)
wasm-bindgen = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true }
web-sys = { version = "0.3", features = [
    "console", "Window", "Performance", "Document", "Element", "HtmlElement",
    "HtmlCanvasElement", "HtmlInputElement", "HtmlSelectElement", "CanvasRenderingContext2d",
    "EventTarget", "Event", "NodeList", "DomTokenList", "CssStyleDeclaration"
], optional = true }
getrandom = { version = "0.2", features = ["js"], optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }

# Numeric
num-traits = "0.2"

# Type-safe physical units (Poka-Yoke)
uom = { version = "0.36", features = ["serde"] }

# TOML parsing (for stack discovery)
toml = "0.8"

# Bitflags for abort conditions
bitflags = "2.6"

# Work stealing for Heijunka
crossbeam-deque = "0.8"

# Z3 SMT Solver for formal equation verification (MANDATORY for EDD)
# Microsoft Research theorem prover - 2019 Herbrand Award, 2015 ACM SIGPLAN Award
z3 = { version = "0.12", optional = true }

[dev-dependencies]
# Property-based testing (Popperian falsification)
proptest = "1.5"
criterion = { version = "0.5", features = ["html_reports"] }
tempfile = "3.14"
# Probar WASM testing framework (using local path for development)
jugar-probar = { path = "../probar/crates/probar" }

[features]
default = ["schema-validation"]
tui = ["dep:ratatui", "dep:crossterm"]
web = ["dep:tokio", "dep:axum"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "dep:web-sys", "dep:getrandom", "dep:serde-wasm-bindgen", "dep:console_error_panic_hook"]
full = ["tui", "web", "schema-validation"]
# EDD verification feature - enables extended verification tests
verification = []
# Property-based testing feature
proptest = []
# Z3 equation proofs - MANDATORY for EDD compliance (quality gate EDD-11, EDD-12)
z3-proofs = ["dep:z3"]
# JSON Schema validation (disabled for WASM due to getrandom 0.3 issues)
schema-validation = ["dep:jsonschema"]

[lib]
name = "simular"
path = "src/lib.rs"
crate-type = ["cdylib", "rlib"]

[[bin]]
name = "simular"
path = "src/main.rs"

[[example]]
name = "monte_carlo"
path = "examples/monte_carlo.rs"

[[example]]
name = "physics_simulation"
path = "examples/physics_simulation.rs"

[[example]]
name = "optimization"
path = "examples/optimization.rs"

[[example]]
name = "reproducibility"
path = "examples/reproducibility.rs"

[[example]]
name = "jidoka_guards"
path = "examples/jidoka_guards.rs"

[[example]]
name = "orbit_demo"
path = "examples/orbit_demo.rs"

[[example]]
name = "tsp_grasp_demo"
path = "examples/tsp_grasp_demo.rs"

[[bin]]
name = "orbit-tui"
path = "src/bin/orbit_tui.rs"
required-features = ["tui"]

[[bin]]
name = "tsp-tui"
path = "src/bin/tsp_tui.rs"
required-features = ["tui"]

[[bench]]
name = "simulation_benchmarks"
harness = false

[profile.release]
lto = true
codegen-units = 1
opt-level = 3

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

# Force getrandom to use js feature for WASM
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.2", features = ["js"] }

[lints.rust]
unsafe_code = "deny"

[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"