Composable primitive material-property utilities for Rust.
use-materials is part of RustUse, alongside sibling repositories such as
use-math, use-stats, use-optimization, use-simulation,
use-control, use-signal, use-physics, use-chemistry,
use-measure, use-units, and use-color. It groups small, focused
crates for density, stress, strain, elasticity, hardness, thermal expansion,
conductivity, and lightweight material-property metadata.
The RustUse approach in this workspace stays intentionally narrow:
- crates stay small and independently useful
- APIs stay explicit, documented, tested, and composable
- implementations favor practical
f64,usize, and small structs or enums - dependencies stay minimal so each crate is easy to audit and adopt
Initial calculations assume SI units unless otherwise documented.
use-materials: thin facade crate that reexports the full materials workspaceuse-materials-density: material density primitives and conversions, exposed in code asuse_densityuse-stress: stress and pressure-like helpers in pascalsuse-strain: engineering strain and percent-strain helpersuse-material-elasticity: Young's-modulus and elastic-deformation helpers, exposed in code asuse_material_elasticityuse-hardness: hardness values and same-scale comparisonsuse-thermal-expansion: linear expansion and coefficient helpersuse-conductivity: thermal and electrical conductivity helpersuse-material-property: lightweight material-property metadata helpers
If you want one dependency for the whole workspace, use use-materials. It
reexports each focused crate and exposes the focused APIs directly so this
works:
use use_materials::*;
let density = Density::new(7_850.0).unwrap();
let stress = Stress::new(250_000_000.0).unwrap();
let expansion = linear_expansion(2.0, 12.0e-6, 50.0).unwrap();
assert_eq!(density.kg_per_m3(), 7_850.0);
assert_eq!(stress.megapascals(), 250.0);
assert_eq!(expansion, 0.0012);This workspace is experimental while it remains below 0.3.0. Expect the
public API to stay small and practical, but still evolve as the RustUse
materials surface becomes clearer.
Run the standard workspace checks from the repository root:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo doc --workspace --no-deps