Supply Chain Integrity, Transparency, and Trust (IETF SCITT)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix ocaml-scitt build: use Backend.Make instead of record literal

Backend.t is now abstract — convert irmin_backend_of_atp from a
record literal to a proper Atp_backend module matching Backend.S,
packed via Backend.Make.

+25 -15
+25 -15
lib/atp/scitt_atp.ml
··· 53 53 end 54 54 55 55 (** Bridge ATP blockstore → Irmin CID backend for proof generation. *) 56 - let irmin_backend_of_atp (store : Atp.Blockstore.writable) : 57 - Atp.Cid.t Irmin.Private.Backend.t = 58 - { 59 - read = (fun cid -> store#get cid); 60 - write = (fun cid data -> store#put cid data); 61 - exists = (fun cid -> store#has cid); 62 - get_ref = (fun _ -> None); 63 - set_ref = (fun _ _ -> ()); 64 - test_and_set_ref = (fun _ ~test:_ ~set:_ -> false); 65 - list_refs = (fun () -> []); 66 - write_batch = 67 - (fun objects -> List.iter (fun (cid, data) -> store#put cid data) objects); 68 - flush = (fun () -> store#sync); 69 - close = (fun () -> ()); 70 - } 56 + module Atp_backend : 57 + Irmin.Private.Backend.S 58 + with type t = Atp.Blockstore.writable 59 + and type hash = Atp.Cid.t = struct 60 + type t = Atp.Blockstore.writable 61 + type hash = Atp.Cid.t 62 + 63 + let read store cid = store#get cid 64 + let write store cid data = store#put cid data 65 + let exists store cid = store#has cid 66 + let get_ref _ _ = None 67 + let set_ref _ _ _ = () 68 + let test_and_set_ref _ _ ~test:_ ~set:_ = false 69 + let list_refs _ = [] 70 + 71 + let write_batch store objects = 72 + List.iter (fun (cid, data) -> store#put cid data) objects 73 + 74 + let flush store = store#sync 75 + let close _ = () 76 + end 77 + 78 + module Atp_B = Irmin.Private.Backend.Make (Atp_backend) 79 + 80 + let irmin_backend_of_atp store = Atp_B.v store 71 81 72 82 module Make (C : Config) = struct 73 83 let irmin = irmin_backend_of_atp C.store