Split from #86. This is the mechanical, link-blocking half — separated from the
76 PORT-CHECK marker triage (judgement-heavy work) which remains on #86.
Linking is blocked until this lands: the .afs binding wrappers in
`bindings/affinescript/src/` declare externs against `proven_*` symbols
that aren't yet exported from `ffi/zig/src/main.zig`.
1. Missing Zig FFI exports (highest leverage, blocks linking)
Many extern declarations in the .afs files reference symbols that are
not yet exported from `ffi/zig/src/main.zig` — they were only
reachable via JavaScript FFI scope names in `bindings/javascript/src/`.
Adding the Zig wrappers around the existing Idris implementations
(`src/Proven/Safe*.idr`) unblocks the .afs files from compiling against
the C ABI. Modules confirmed to need new Zig exports (from Batch C / D
reports):
`proven_unit_` and `proven_version_` are referenced from
`ffi/beam/src/proven_nif.zig` (so the C-ABI shape is confirmed) but
the symbols aren't yet visible in main.zig's export list.
Two specific ABI sign-offs (carried from #86 §4)
- `SafeMath.clamp(lo, hi, value)` vs `SafeMl.clamp(x, lo, hi)` — pick one.
- `Ipv4Result` and `PasswordValidationResult` repr(C) shapes — predicted
in .afs, needs Zig struct definitions to match.
Acceptance
- All extern declarations in `bindings/affinescript/src/` correspond to a
Zig export in `ffi/zig/src/main.zig` (verified by building the binding
against libproven).
- The two ABI sign-offs above are resolved with the chosen shape committed.
Cross-ref: parent #86 (PORT-CHECK marker triage remains there).
Split from #86. This is the mechanical, link-blocking half — separated from the
76 PORT-CHECK marker triage (judgement-heavy work) which remains on #86.
Linking is blocked until this lands: the .afs binding wrappers in
`bindings/affinescript/src/` declare externs against `proven_*` symbols
that aren't yet exported from `ffi/zig/src/main.zig`.
1. Missing Zig FFI exports (highest leverage, blocks linking)
Many extern declarations in the .afs files reference symbols that are
not yet exported from `ffi/zig/src/main.zig` — they were only
reachable via JavaScript FFI scope names in `bindings/javascript/src/`.
Adding the Zig wrappers around the existing Idris implementations
(`src/Proven/Safe*.idr`) unblocks the .afs files from compiling against
the C ABI. Modules confirmed to need new Zig exports (from Batch C / D
reports):
`proven_unit_` and `proven_version_` are referenced from
`ffi/beam/src/proven_nif.zig` (so the C-ABI shape is confirmed) but
the symbols aren't yet visible in main.zig's export list.
Two specific ABI sign-offs (carried from #86 §4)
in .afs, needs Zig struct definitions to match.
Acceptance
Zig export in `ffi/zig/src/main.zig` (verified by building the binding
against libproven).
Cross-ref: parent #86 (PORT-CHECK marker triage remains there).