You can use this reference to choose an evaluator and interpret its result files. It lists the exact identifiers, resource fields, and lifecycle for Native embed integration. Both evaluators count work and memory and stop at their limits, so they are called resource-controlled evaluators.
Read the outcome first
The complete embed example runs a decision
rule with integer input 14. Its inspection JSON includes these fields.
{
"category": "semantic-complete",
"code": "complete",
"semantic_profile_id": "lispex/r7rs-rule-embedded-core/1"
}With eval_work set to 0, the same prepared rule produces
category: "semantic-exhausted" and code: "eval_work".
The result file records a resource stop. The CLI exits with code 0 when it
successfully writes either outcome.
| Evaluation outcome | Decision evaluator category | Full evaluator category |
|---|---|---|
| Completed | semantic-complete | complete |
| Runtime error | semantic-fault | semantic-fault |
| Resource stop | semantic-exhausted | exhausted |
| Request refused | request-refusal | request-refusal |
| Engine fault | engine-fault | engine-fault |
Select one of two evaluators
The decision evaluator accepts the operation set in its bundle. The full evaluator
provides all 205 primitive procedures, with none marked Deferred in its registry.
Native selects it explicitly through embed full.
| Property | Decision evaluator | Full evaluator |
|---|---|---|
| Command prefix | lispex embed | lispex embed full |
| Language profile | lispex/r7rs-rule-embedded-core/1 | lispex/r7rs-rule-current-profile-bounded/1 |
| Work and allocation model | lispex-vm-meter/1 | lispex-full-vm-meter/1 |
| Artifact header | LPXART01 | LPXFAR01 |
| Initial WASM memory pages | 18 | 19 |
| Maximum WASM memory pages | 256 | 256 |
The full component identifier is lispex-evaluator/rust-vm-current-profile/1.
The bundle manifest, a file listing the bundle's contents and metadata, identifies
each evaluator by its exact WASM SHA-256. That hash identifies the same
bytes in release archives and applications.
The evaluators share these v1 formats.
| Format | Identifier |
|---|---|
| Value codec, the binary encoding of values | lispex.embed-value/v1 |
| Transcript, the ordered evaluation events | lispex.embed-transcript/v1 |
| WASM binary calling interface | lispex.embed-wasm-abi/v1 |
| Portable core, a transferable record of one execution | lispex.embed-receipt-core/v1 |
Set separate preparation and evaluation limits
Both CLI limit files use logical_allocation. The binary request distinguishes
prepare_logical_allocation from eval_logical_allocation.
| Preparation request field | Resource |
|---|---|
raw_source_bytes | Submitted source bytes |
prepare_work | Preparation work units |
prepare_logical_allocation | Preparation allocation units |
syntax_depth | Syntax nesting depth |
| Evaluation request field | Resource |
|---|---|
canonical_input_bytes | Input bytes in the prescribed value encoding |
eval_work | Evaluation work units |
eval_logical_allocation | Evaluation allocation units |
semantic_frames | Active semantic continuation frames |
traversal_depth | Value traversal depth |
output_bytes | Program output bytes |
diagnostic_bytes | Diagnostic bytes |
transcript_bytes | Encoded event bytes |
transcript_events | Number of recorded events |
result_bytes | Encoded result bytes |
A continuation frame stores what remains to do after a call. Proper tail calls reuse the current semantic continuation.
Each resource model defines the cost of work and the units of logical allocation. The evaluator charges before an effect. It uses the full unsigned 64-bit range and stops at the first reservation that would exceed a limit. See Execution Conditions for repeatability.
Call the WASM interface
Each module has zero imports and one memory. It exports allocation, deallocation, interface-version, prepare, and evaluate functions, alongside the standard globals that mark memory boundaries. Requests encode field lengths and unsigned integers in big-endian order. The caller supplies the resource limits.
Each preparation or evaluation creates a fresh Wasmtime Store and Instance. Memory, allocator, program heap, symbol storage, mutable cells, continuations, work counter, transcript, and result buffer are new for that operation. An application can share the immutable compiled Module when it has the exact same WASM identifier.
Preserve execution identities and results
The portable core binds the submitted source, canonical source, semantic rule,
canonical input, resource limits, request, evaluator artifact, evaluation,
transcript, and result. Canonical means one prescribed byte representation.
The lispex.evaluation-identity/v1 construction hashes length-delimited fields
with SHA-256.
| Terminal class | Stored information |
|---|---|
| Deterministic semantic outcome | Result, transcript, and portable core |
| Deterministic request refusal | Refusal, transcript, and portable core |
| Operational interruption | Terminal engine status |
| Engine fault | Terminal engine status and diagnostics |
Issuers can sign completed portable-core bytes through decision exchange and Lispex Vouch workflows. Signing and application permission are separate steps.
Use a Native decision directory
The decision-rule guide shows a complete
rule run, rule inspect, rule verify, and rule replay workflow.
rule run accepts source and strict JSON input files, plus separate preparation
and evaluation limits.
| JSON input | Lispex value |
|---|---|
| Object | Record |
| Array | Vector |
| String, boolean, exact integer | The corresponding value kind |
null | Empty list |
A completed run creates five files in a new output directory.
| File | Contents |
|---|---|
prepared.lpxembed | Prepared rule |
canonical-input.lpxvalue | Input in the prescribed binary encoding |
result.lpxembed | Outcome and its request binding |
receipt-core.lpxreceipt | Portable core |
summary.json | Readable JSON summary of those files |
rule inspect summarizes the directory. rule verify checks its member set
and byte bindings. rule replay evaluates the recorded request in a fresh
instance and checks the result and portable core.
Keep application responsibilities explicit
Native includes the evaluator's exact bytes. Releases also supply the WASM bundle, manifest, test vectors, verification material, and software bill of materials. They include dependency handling decisions, safety evidence, and an append-only graph of release records. Retained evaluator bytes keep historical records readable.
The calling application retains source and manages network access, business policy, freshness, duplicate-use prevention, and external actions. Decision exchange carries signed issuer records and applies recipient policy. Lispex Vouch authenticates signed evidence and checks the local decision gate. Topaz components retain their own compiler and acceptance-check identifiers.