diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2025-11-11 00:00:43 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2025-11-11 00:00:43 -0300 |
| commit | 3063608df6ff1668f683d9d22c57fea29d728d0d (patch) | |
| tree | 36be7f6c6d901c5984c045d4ce823bd24c37e9af /lib/core_functions.ml | |
| parent | b5dbdaa989a86477669aac0bf342029e1d2b6028 (diff) | |
| download | Sakura-3063608df6ff1668f683d9d22c57fea29d728d0d.tar.gz Sakura-3063608df6ff1668f683d9d22c57fea29d728d0d.zip | |
migrating to erlang to attach to mnesia
Diffstat (limited to '')
| -rw-r--r-- | lib/core_functions.ml | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/core_functions.ml b/lib/core_functions.ml deleted file mode 100644 index 3d1cd35..0000000 --- a/lib/core_functions.ml +++ /dev/null @@ -1,25 +0,0 @@ -(* open Ctypes *) - -module Types = Types_generated - -module Functions (F : Ctypes.FOREIGN) = struct - (* open F *) - open Ctypes_static - let os_extension = - if Sys.os_type = "Unix" then - let ic = Unix.open_process_in "uname" in - let uname = input_line ic in - let () = close_in ic in - if uname = "Darwin" then - "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 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 |
