From 7b28dd8265e2546e656b6198eca0c6fe5fba2c21 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Fri, 22 Dec 2023 18:24:12 -0700 Subject: [PATCH] update build setup --- Cargo.toml | 1 + codex_storage_proofs.nim | 19 ++++++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b86b111..da84cf9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ opt-level = 3 [profile.release] strip = true +opt-level = 2 [lib] crate-type = [ diff --git a/codex_storage_proofs.nim b/codex_storage_proofs.nim index 1205956..094e07d 100644 --- a/codex_storage_proofs.nim +++ b/codex_storage_proofs.nim @@ -1,22 +1,19 @@ import std/os +import std/strutils +import std/sha1 +import std/macros const currentDir = currentSourcePath().parentDir() - lib_path* = currentDir/"target"/"release"/"libcodex_storage_proofs.a" + libPath* = currentDir/"target"/"release"/"libcodex_storage_proofs.a" static: - echo "\n==== CODEX:STORAGE:PROOFS: " - echo "cwd: ", currentDir - echo "lib_path: ", lib_path - # echo "pwd: ", projectDir() - # echo "cwd: ", getCurrentDir() - let cmd = "pwd && cargo build --release" - echo "\nBuilding codex-storage-proofs: " & cmd + let cmd = "cargo build --release" + hint "\nBuilding codex-storage-proofs: " & cmd let (output, exitCode) = gorgeEx cmd - echo output + for ln in output.splitLines(): + hint("cargo> " & ln) if exitCode != 0: - # discard gorge "rm -rf " & buildDir raise (ref Defect)(msg: "Failed to build codex-storage-proofs") - echo "\n===="