Bring the whole workspace into compliance with the repo's rustfmt config (edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted across many crates. Pure formatting — no logic changes; `cargo fmt --check` is now clean and `cargo build --workspace` is green.
10 lines
483 B
Rust
10 lines
483 B
Rust
use lawsynth_wasm::{Expression, MemoryBudget, WasmConfig, World, simulate_rk4};
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
let mut memory = MemoryBudget::new(1024 * 1024)?;
|
|
memory.reserve(128)?;
|
|
let world = World::new(vec!["x".into()], vec![1.0], vec![Expression::parse("-x")?])?;
|
|
let trajectory = simulate_rk4(&world, 0.0, 1.0, 0.1, &WasmConfig::default())?;
|
|
println!("{} samples; {} bytes remain", trajectory.len(), memory.available());
|
|
Ok(())
|
|
}
|