@altopelago/aeon-wasm
v0.9.0
Published
Browser-facing wrapper for the Rust AEON implementation.
Downloads
95
Readme
@altopelago/aeon-wasm
Browser-facing wrapper for the Rust AEON implementation.
The TypeScript package is intentionally thin. It loads the generated wasm-pack
output from pkg/ and exposes a typed async API for parity playgrounds and
browser-based conformance checks.
import { processAeon } from '@altopelago/aeon-wasm';
const result = await processAeon('name:string = "AEON"\n', {
validationMode: 'strict',
finalizeScope: 'payload',
});
console.log(result.finalized.document);processAeon returns the normalized engine contract used by browser parity
tools:
engine: currentlyrust-wasmok: true when there are no errorscanonical.text: canonical AEON textfinalized.document: materialized JSON-compatible output, ornullevents: normalized event summariesannotations: annotation stream recordsdiagnostics.errorsanddiagnostics.warnings
For compatibility, errors and warnings are also exposed as top-level aliases
of diagnostics.errors and diagnostics.warnings.
Build
Build the TypeScript wrapper:
pnpm --filter @altopelago/aeon-wasm buildBuild the Rust WASM artifact:
pnpm --filter @altopelago/aeon-wasm build:wasmbuild:wasm requires wasm-pack and reads the Rust crate from
implementations/rust/crates/aeon-wasm.
