From fcb5613755b08fcb7ae73a3826b1cdce40e2747f Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 27 Oct 2024 01:53:18 -0300 Subject: State of the world with Merkle Tree composition of files (#2) * file state hash calculation with history on replace and insert * add state transitions with linear hashing * add test * format dune files * nix format * delete shared flake * disable fmt check on flake * add nix formatter to flake shell --- lib/core_functions.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/core_functions.ml') diff --git a/lib/core_functions.ml b/lib/core_functions.ml index 1e1af37..3d1cd35 100644 --- a/lib/core_functions.ml +++ b/lib/core_functions.ml @@ -14,8 +14,12 @@ module Functions (F : Ctypes.FOREIGN) = struct "dylib" else "so" else "dll" - let libmerklecpp = Dl.dlopen ~flags:[RTLD_GLOBAL; RTLD_NOW] ~filename:((Sys.getenv "LIBRELATIONAL_ENGINE_LIB_PATH") ^ "/librelational_engine." ^ os_extension) + let libmerklecpp = + Dl.dlopen + ~flags:[RTLD_GLOBAL; RTLD_NOW] + ~filename:((Sys.getenv "LIBRELATIONAL_ENGINE_LIB_PATH") ^ "/librelational_engine." ^ os_extension) let compute_hash = Foreign.foreign ~from:libmerklecpp "compute_hash" (ptr char @-> Ctypes.string @-> returning void) let merkle_generate_root = Foreign.foreign ~from:libmerklecpp "merkle_generate_root" (ptr Ctypes.string @-> int @-> ptr char @-> returning void) + let register_to_merkle = Foreign.foreign ~from:libmerklecpp "register_to_merkle" (Ctypes.string @-> Ctypes.string @-> returning void) end -- cgit v1.2.3