Skip to main content

Crate frazaro_core

Crate frazaro_core 

Source
Expand description

frazaro-core: the host-free home of the Frazaro language’s bridges.

The contract (docs/HORIZON.md, section 12): bytes in, bytes out, nothing else. No clock, no randomness, no threads, no file system, no socket. On the wasm32 target the built module’s import section is empty, and tools/check_core_imports.ps1 pins that count at zero.

Since PORT.12 (2026-10-08) the language itself is a crate of its own, vla-lang, this crate’s one dependency: the reader, the forms and their printing, macro expansion, the head table, the intrinsics, the message catalogue’s mechanism with the language’s own refusals, the version predicates, the grid, the references read out of a formula’s text, the relation rows and the view record. Those modules are re-exported here whole, below, so every path a door used before the cut resolves as it did. What this crate holds is the bridges: the English engine (english), the VBA and formula emitters (emit), the workbook writer (build over sheet’s formats) and the readers (reflect), the formula sink’s scan (egress), the distro manifest (distro), the kernel’s registries (kernel), the core’s half of the catalogue (messages), the API (api) and the C surface (abi). The three-crate order is Alonzo/CHARTER.md section 4, rule 1: an engine consumes vla-lang and never this crate.

SD-18 governs what this crate may claim: the VBA in src/ is the reference implementation, and this crate follows the goldens in scripts/ and never leads them. conformance/README.md is the treaty; tools/prove.ps1 scores an implementation against it.

The API a door calls is VLA_Browser.bas’s pair, text in and text out: api::english_translate_text_to_vla and api::english_translate_text_to_vba (PORT.6, slice 6g), and abi exports the pair with C linkage for a wasm host or a native embedding (6h): an allocator pair, the two functions, the door’s gate and the version, every answer one record in the module’s memory. The version and the ABI number were exported from the first commit, so that CI held the zero-import property before anything else existed.

The writer (PORT.7) is build over sheet: a translated program to a workbook’s bytes, deterministic, with no clock and no dependency outside the repository; api::english_build_xlsx is its surface.

The reader (PORT.8) is reflect: a workbook’s bytes, OOXML first, read as the relations of REFLECT with no host, streamed sheet by sheet; api::reflect_relations is its surface. refers (slice 8b, the language’s since the cut) is the formula-reference reader, VLA_Refers.bas ported and held to its golden: the refers rows, the writer’s mover and the R1C1 rendering all come off its one scan.

egress (SEC.15) is the formula sink’s scan, VlaFormulaEgress of VLA_Runtime.bas held to the egress golden: the writer asks it before it writes a formula, as the add-in’s two backends do, and refuses one that reaches outside the workbook on its own.

kernel (KERNEL.1) writes the kernel’s boundary and its six seams down as data and names the engines trait; the projections seam’s trait is the language’s (vla_lang::projection) and is re-exported there. view (KERNEL.4, the language’s) is the first implementation of that seam: one window of the sheet model as the view record, a pure function of the program and the books, the lines a viewport draws from; api::english_view is its surface. distro (KERNEL.2) reads a distro’s manifest, the folder the build tools take: the prelude, the phrasebooks in their load order, the dialects, the libraries and an edition’s chrome, by reference; the command-line door proves a distro whole with it.

Modules§

abi
The C-ABI door (PORT.6, slice 6h): the translate API over plain C linkage, for a wasm host or a native embedding, with no binding layer. Every function is #[no_mangle] extern "C"; on wasm32 the module exports them beside memory, and its import section stays empty (tools/check_core_imports.ps1), so a page that loads it cannot phone home even by mistake (SD-13).
api
The translate API (PORT.6, slice 6g): VLA_Browser.bas’s two functions, the surface a door calls - the C-ABI export (6h), the web page, any embedding. Text in, text out, and a refusal back as the teaching text the add-in shows, as a value instead of a dialog.
build
The build (PORT.7): a program’s sentences to a workbook’s bytes, through the sheet model and the OOXML writer.
calc
Recalculation’s mechanism (KERNEL.7, slice 1, 2026-10-08): the formula parser over the reference scanner, the dependency graph from refers, evaluation in topological order, a cycle refused by name, Excel’s error values as a value kind, and a registry seam for functions, with the language’s own functions registered.
distro
The distro (KERNEL.2, 2026-10-07): the folder the build tools take, read from its manifest. The design is web/CALLOSUM.md §14.1: a distro is a folder of phrasebooks, libraries, examples, a palette, an edition’s chrome, a README and the lines a new program opens with, baked by the existing build tools into one page, one add-in and one command-line door; the registry is a repository the user clones, never fetched (SD-13), and the build stamp’s hashes are the lockfile.
egress
The formula sink’s scan (SEC.15): VLA_Runtime.bas’s VlaFormulaEgress, one arm per arm, held to the egress golden.
emit
The VBA emitter: VLA.bas’s VlaTranspile, EmitTop, EmitProc and the compile state they carry (PORT.5, slice 5e). The statement, expression and formula emitters are the submodules, one match arm per Select Case arm; the names module holds SymName and its kin.
english
English in the core: VLA_SentenceEngine.bas and VLA_English.bas, ported slice by slice (PORT.6; docs/HORIZON.md section 12, slice 2).
excel
Excel’s library, registered through the language’s functions seam (KERNEL.7, 2026-10-08): the declared subset frazaro calc computes, each function with the evidence that admitted it.
expand
The macro system: VLA.bas’s DefineMacro, ExpandMacros, ExpandOne, Substitute with the QUASIQUOTE bundle, the twenty-seven LISTOPS primitives, ExpandOnePass, and VlaExpandText (PORT.5, slice 5d; the expand-time object model’s ten, VLA.3); and formula-expand, the formula syntax at expand time, an operation of the walk that expands its argument before writing it (ExpandFormulaCall, VLA.4).
form
The datum: what the reader produces and every later stage walks.
formula_syntax
The formula syntax (VLA.4, 2026-10-17): a VLA expression written as a formula’s text, and a formula’s text read back as a VLA expression.
headtable
The head table: VLA_HeadTable.bas’s catalogue of the core forms, read as data (PORT.5, slice 5c).
intrinsics
The VBA behaviours the port must match: docs/INTRINSICS.md, one function per entry that is a function at all (PORT.5, slice 5a).
kernel
The kernel’s boundary, and the six seams through which everything else enters (KERNEL.1, 2026-10-06; the design is web/CALLOSUM.md §14).
messages
The core’s half of the message catalogue, over the language’s mechanism (PORT.12): every refusal is RaiseMsg "<id>", slot, value, ... in the reference (SD-2), and since the cut the exported catalogue is two files from the one VBA source, src/VLA_Messages.bas, written by tools/export_messages.ps1 and held to it by tools/check_data_exports.ps1: vla-lang/data/messages.vla holds the language’s families (vla, interp, lint, view), and core/data/messages.vla, embedded here, holds the rest: the English engine’s, the build’s, the reader’s, the distro’s, the door’s, the engines’ and the add-in’s. raise asks this half first and the language’s after it, so an id raised from either crate is found, and the two internal errors are the reference’s own words as before.
printer
The printer: VLA.bas’s WriteDatum and WritePretty.
reader
The reader: VLA.bas’s Tokenize and ParseAll/ParseForm, with the source lines they remember and the two refusals they raise.
refers
The formula-reference reader (PORT.8, slice 8b): VLA_Refers.bas (AXM.7) ported one arm per arm, held to the refers golden.
reflect
The reader (PORT.8): a workbook’s file read as the relations of REFLECT (docs/SINGULARITY.md, Stage 0.1; the roadmap’s AXM.8), with no host on the machine.
sha256
SHA-256 (FIPS 180-4), the core’s twin of VLA_Digest.bas’s VlaSha256Hex and of check_rule_coverage.ps1’s Get-SourceHash (PORT.7, slice 7c).
sheet
The sheet model’s file formats (PORT.7): the OOXML writer and the zip, XML and inflate it stands on, the merge of a build into a host’s workbook, and the file format’s names for Excel’s newer functions. The model itself, sheets of cells with their A1 coordinates and a style table, is the language’s since PORT.12 (vla_lang::sheet) and is re-exported here whole, so that crate::sheet::Workbook and every other name the writer, the readers and the tests use are what they were.
version
The version predicates (parse, compare, at_least), the language’s, re-exported as the module they were; the function version below is the core’s own.
view
The view record (KERNEL.4, 2026-10-07): one window of the sheet model as lines, the first implementation of the kernel’s projections seam (crate::projection::Projection; the design is web/CALLOSUM.md §7, decisions 1 and 2, and §8, slice 1).

Constants§

ABI_VERSION
The number a door checks before calling anything else. It changes only when an exported signature changes its meaning.
VERSION
The crate’s version, which tools/check_version_twin.ps1 holds equal to VLA_RELEASE_VERSION in src/VLA.bas and to the language crate’s: one corpus, one version.

Functions§

frazaro_abi_version
The ABI number, exported with C linkage so that a wasm host or a native embedding can read it without any binding layer.
version
The version as text.