1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! frazaro-core: the host-free home of the Frazaro language.
//!
//! 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.
//!
//! 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;
//! `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) 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.
/// The crate's version, which tools/check_version_twin.ps1 holds equal to
/// VLA_RELEASE_VERSION in src/VLA.bas: one corpus, one version.
pub const VERSION: &str = env!;
/// The number a door checks before calling anything else. It changes only
/// when an exported signature changes its meaning.
pub const ABI_VERSION: u32 = 1;
/// The version as text.
/// The ABI number, exported with C linkage so that a wasm host or a native
/// embedding can read it without any binding layer.
pub extern "C"