kip
Pure, thread-safe engineering expression evaluator for US imperial units, with exact rational arithmetic, partial (symbolic) evaluation, empirical code equations, and a user-extensible unit registry.
Status: 0.1.0 — M0–M8 complete (lexer through release hardening).
use ;
let reg = from_seed.freeze;
let expr = parse.unwrap;
let value = eval.unwrap;
println!;
Three load-bearing requirements
- P1 — Parallel branch evaluation. Immutable ASTs, registries, and pure evaluation — no globals, no locks.
- P2 — Empirical engineering expressions as default. Code equations (
ACI.fr(fc: f'c, lambda: 1.0)) are the main road. - P3 — User-defined units anchored to inch, lbf, second, Rankine (plus angle and custom base dimensions).
Force-based system
kip uses a force-based (gravitational) dimensional system common in structural engineering: Force is fundamental (lbf), mass is derived (slug = lbf·s²/ft). There is no hidden gc in user-visible math. SI-trained users: do not expect mass to be fundamental here.
Quick start
[]
= "0.1.0"
use RegistryBuilder;
let mut b = from_seed;
b.parse_defs.unwrap;
let reg = b.freeze;
Features
| Feature | Default | Description |
|---|---|---|
packs |
yes | TOML equation-pack loader |
parallel |
yes | rayon batch/scenario helpers + intra-expr join |
si-display |
no | Display-only SI table (reserved) |
Examples
examples/sheet.rs— topo-sort host pattern witheval_batchexamples/sweep.rs— partial eval + parallelValue::bindsweep
Development
&&
See VERSIONING.md for release policy.
License
Licensed under either of MIT or Apache-2.0 at your option.