logos-storage-proofs/codex_storage_proofs.nim

25 lines
577 B
Nim
Raw Normal View History

import std/os
2023-12-22 18:24:12 -07:00
import std/strutils
import std/sha1
import std/macros
2023-12-22 18:07:17 -07:00
const
currentDir = currentSourcePath().parentDir()
2023-12-22 18:45:26 -07:00
libDir* = currentDir/"target"/"release"
libPath* = libDir/"libcodex_storage_proofs.a"
2023-12-22 18:07:17 -07:00
static:
2023-12-22 18:24:12 -07:00
let cmd = "cargo build --release"
2023-12-22 18:28:15 -07:00
warning "\nBuilding codex-storage-proofs: " & cmd
2023-12-22 18:07:17 -07:00
let (output, exitCode) = gorgeEx cmd
2023-12-22 18:24:12 -07:00
for ln in output.splitLines():
2023-12-22 18:28:15 -07:00
warning("cargo> " & ln)
2023-12-22 18:07:17 -07:00
if exitCode != 0:
raise (ref Defect)(msg: "Failed to build codex-storage-proofs")
2023-12-22 18:45:26 -07:00
{.passl: "-lcodex_storage_proofs" & " -L" & libDir.}
2023-12-22 19:03:43 -07:00
proc prove_mpack_ext()