Rs Standard Library Extensions
Module paths below use the rs:: logical namespace. The crate on crates.io is rs-lang; in Rust code, import as use rs_lang::prelude::*; or use rs_lang::fixed_point::FixedPoint;.
rs::fixed_point
use FixedPoint;
type Amount = ; // 18 decimal places
let a = from_integer;
let b = from_decimal; // 3.14
let c = a.checked_mul.unwrap; // 314.00...
let d = a.checked_div.unwrap; // 31.847...
// All operations: checked_add, checked_sub, checked_mul, checked_div
// All deterministic, all return Option (no panics)
rs::bounded
use ;
let mut v: = new;
v.try_push?; // Returns Err if full
let mut m: = new;
m.try_insert?; // Returns Err if full
let s: = try_from?;
rs::channel
use ;
// Wait-free bounded MPMC channel
let = ;
// Non-blocking send
match tx.try_send
// Bounded receive (with deadline from async context)
let msg = rx.recv.await; // Inherits caller's deadline
rs::particle
use Particle;
let data = b"hello world";
let particle = from_bytes; // Hemera hash
// Particle is Copy, 64 bytes (8 Goldilocks field elements), comparable, hashable
let map: = new;
rs::arena
use Arena;
let arena: = new;
let item: &mut MyStruct = arena.alloc?;
// Arena tracks count, provides iteration
assert!;
for item in arena.iter
// All freed on drop — no individual deallocation