Regen State 2.0.0 publishes a Rust software API for byte-bound WebAssembly state models
The package documents pure evaluation with host-provided observations, capacity boundaries and freshness checks.
A versioned pure evaluation package
Regen State 2.0.0 was released on November 29. The registry records the version and Docs.rs completed a separate documentation build for x86_64 Linux. The documentation describes a pure state model that receives observations as bytes from an embedding host. The model has no independent authority to take action or read that external source. The package includes an example designed around the same model on native and browser targets. The Linux documentation record establishes the package build in one environment without measuring application throughput or memory across hosts.
Collect the observation outside the model
A maintenance dashboard might read counters from two systems before producing a derived status. The host can perform the external reads and pass serialized observations into the model. On a test run it can pass the same observations without establishing a network connection. That separation makes the model behaviour reproducible for a fixed input. It also leaves the host responsible for missing data, upstream errors and the provenance of a reading. A valid byte sequence does not by itself prove what happened upstream.
Validate the wire framing before interpreting a result
The package documents a linear-memory framing used by the native runner as well as a current-state wire format. A test can distinguish malformed length, an unfamiliar version identifier and a valid empty result. Each tells an application something different. The first cases can stop processing and point to a conversion or producer issue. A valid state can continue through the application’s ordinary decision path. Recording which part of the wire contract was used makes a later replay meaningful without logging the original data unnecessarily.
Track the different memory measures
The documentation distinguishes model capacity chosen by the native host, ABI linear capacity and overall process memory. A test can hold the input constant while varying the host budget, then increase input size to identify the actual refusal boundary. Those observations should identify the runtime and memory measure. They prevent a WebAssembly buffer limit from being mistaken for the native process footprint. The data supplied to the model and the policy choosing how much memory is available remain separate controls.
Pass the same example through both targets
Fix a small byte fixture and expected result before comparing a native build with WebAssembly execution. Add a second fixture with a stale observation or a bad dependency. That gives the upgrade a positive and a negative check. The documented freshness helpers establish how those inputs are evaluated. If an application needs a revision history, it must keep that data separately from the model values. Record which wire format and target produced each result so that someone else can reproduce the comparison.
Archive photo · www.Pixel.la Free Stock Photos / Wikimedia Commons ↗ · CC0
Sources and verification
- Primary sourcecrates.io sürüm kaydı ↗
- Technical documentSürüme ait paket belgeleri ↗
- Reporting / cross-checkDocs.rs bağımsız Linux belge derlemesi ↗
Reader discussion
What would you change first for maintainability and testing in your own project?
No comments yet. Be the first to contribute.
Write a comment