aboutsummaryrefslogtreecommitdiffstats
path: root/lib/core_functions.ml
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2024-10-27 01:53:18 -0300
committerGitHub <noreply@github.com>2024-10-27 01:53:18 -0300
commitfcb5613755b08fcb7ae73a3826b1cdce40e2747f (patch)
treee9f1df3a4e0d9b2bb38fdc432edeae21424dbe99 /lib/core_functions.ml
parent2eab114a120c7818861c0640ecdc300cf7366e53 (diff)
downloadSakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.tar.gz
Sakura-fcb5613755b08fcb7ae73a3826b1cdce40e2747f.zip
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
Diffstat (limited to '')
-rw-r--r--lib/core_functions.ml6
1 files changed, 5 insertions, 1 deletions
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