Skip to content

Commit 36a77c0

Browse files
fix(ml-mcp): add HuggingFaceResource enum to Zig FFI (standards#152) (#122)
Class C ABI gap. `HuggingFaceResource` (4 variants, `hfResourceToInt` 1–4) was Idris2-only. `iseriser abi-verify` → exit 0 (3 enums, 6 transitions); `zig build test` → 24/24 green. Closes hyperpolymath/standards#152 Refs hyperpolymath/standards#92, #89 Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 936d084 commit 36a77c0

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cartridges/ml-mcp/ffi/ml_ffi.zig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ pub const MlProvider = enum(c_int) {
2525
custom = 99,
2626
};
2727

28+
/// Hugging Face resource types — mirrors `MlMcp.SafeMl.HuggingFaceResource`
29+
/// + `hfResourceToInt` encoding. Declared here so `iseriser abi-verify`
30+
/// can structurally check the encoding against the Idris2 source.
31+
pub const HuggingFaceResource = enum(c_int) {
32+
hf_model = 1,
33+
hf_space = 2,
34+
hf_dataset = 3,
35+
hf_inference = 4,
36+
};
37+
2838
// ═══════════════════════════════════════════════════════════════════════
2939
// Session State Machine
3040
// ═══════════════════════════════════════════════════════════════════════

0 commit comments

Comments
 (0)