# SOLONCODE pure Wasm project

Artifact **0.5.57**, profile `closed-pure-wasm-project-v1`. This is a bounded pure-project WebAssembly reactor. The artifact version is separate from Source language 0.4.38, maximum AST 27 and wire 1.

## Contents

`bin/soloncode-project.wasm` contains the closed compiler/runtime/project implementation as compiled target32 bytecode and Wasm code. Implementation Sources, build tools, bytecode headers and private qualification records are excluded. A compiled binary can still be reverse engineered.

`ABI.json` describes the callable surface, `RELEASE.json` identifies the binary, `THIRD-PARTY-NOTICES.txt` preserves upstream notices, and `MANIFEST.sha256` covers every other payload file. The bundled request, expected response and four readable .solon files are synthetic user examples.

## Host integration

The local finite qualification uses Node 24 on macOS arm64. Other engines/hosts, signing, hard realtime deadlines and performance advantages are not qualified by this package. This module has no standalone CLI entry and does not provide a general WASI environment.

1. Load the Wasm bytes and instantiate a fresh module with exactly the two function imports in ABI.json.
2. Provide `solon.monotonic_ms() -> f64` as a finite nonnegative monotonic time in milliseconds. Provide `wasi_snapshot_preview1.clock_time_get(i32,i64,i32) -> i32` for clock ID 0 only. Its precision argument is an unsigned BigInt; its output pointer must be 8-byte aligned and bounded. Write a realtime Unix nanosecond u64 in little endian and return 0. Reject other clocks/capabilities.
3. Call `_initialize()` exactly once. Read unsigned request pointer/capacity and bounds-check them against a freshly acquired memory.buffer.
4. Copy one complete canonical request into the 16 MiB request region. Call `solon_run(requestByteLength)` once.
5. Reacquire memory.buffer, then bounds-check the unsigned response pointer/length before copying response bytes. Return 0 admits one complete closed JSON response, even if its status is error. Return -1 admits no response. A second call returns -2 and preserves the first response; use a fresh instance for each request.

Memory starts at 64 MiB and may grow to 512 MiB. Request and response regions each have fixed 16 MiB capacity and do not overlap. The VM allocator limit is 256 MiB and its stack budget is 8 MiB. These are linear-memory/VM bounds, not OSRSS or startup guarantees. A grow can detach all old typed-array/DataView buffers.

The two clocks are separate: realtime supports the original Date semantics, while monotonic time supports deadlines and the 20-second interrupt guard. The guard is not a hard wall-clock or process shutdown guarantee. No general WASI, argv, environment, filesystem, preopens, random, fd data, network, models or external effect adapters are provided.

## Request and response

A request is canonical UTF-8 JSON with fields in this order: `format, operation, entry, sources, inputs, budget`. Its format is `solon-wasm-project-json-v1`; operation is check or run. Canonical means the original bytes equal JSON.stringify(JSON.parse(text)); it is not key sorting. The request has no BOM or trailingLF.

The explicit sources map supplies every virtual file as exactly Source Text and its lowercase SHA256. The original project factory verifies all supplied entries, including unused ones. Relative imports resolve within that map; the guest does not read the host filesystem. Dot segments may normalize inside import specifiers; escaping the virtual root, absolute paths, arbitrary JavaScript and supplied bytecode are refused.

Inputs are ordered name/tagged-value pairs. Finite numbers use 16 lowercase hexadecimal IEEE754 bits, preserving negative zero. Text, Truth yes/no/unknown, arrays, records, Boolean and null retain their original runtime distinctions. Truth is not accepted inside Record JSON values.

Budget is an ordered subset of maxSteps, maxOutputBytes, deadlineMs. Positive safe integers and the original runtime limits apply; an empty object selects original defaults. No automatic retry increases a budget.

A response is one closed JSON object followed by oneLF. Its fields are format, status, profile and exactly one of outputs, contract or error. Successful check returns descriptors as DATA, not a Program handle. Successful run returns ordered output/tagged-value pairs. An error has code, phase, location and no message, stack or Source excerpt. Ordinary JSON issues no permissions, receipt or owner authority.

## Finite limits

The profile permits 16 supplied files, import depth 8, total supplied Source 65536 UTF-8 bytes, one Source 65536 UTF-16 units, 256-character ASCII virtual paths and 64 linked functions. Semantic inputs are bounded at 1 MiB and value depth 64. The16MiB transport bounds describe a different layer. Generated linked Source still obeys the original SOURCE_LIMIT, so an input at the supplied maximum can refuse after linking.

Marked effect functions, entry use, interfaces and qualified external calls are outside this profile. This package does not qualify the separate effectful-native bridge or the overall platform.

## Bundled example and finite evidence

The example request embeds the four virtual Sources shown under examples/project. Editing only those readable reference files does not modify the request map. Inputs [2,5,-1] yield doubled [10,16,4], separate-module delta 8 and total 38. The exact observed complete response is examples/project.expected.json.

Local built qualification contains seven successful runs, one successful check, 24 expected refusals and eight ABI cases. Two independently generated build artifacts are whole-byte identical. A separately installed copy is checked against the same 40 cases before release. Local preparation, installation qualification and network publication are distinct states; no public-delivery result is implied by these files.

Verify the binary SHA256 against RELEASE.json and each payload file against MANIFEST.sha256. The expected binary digest is `0b8831861d937d527ef7674a314a7f58d1de9ff9c01e1187e621dcbfc55ee416`.
