update build setup

This commit is contained in:
Jaremy Creechley 2023-12-22 18:24:12 -07:00
parent 44d8e3a22c
commit 7b28dd8265
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 9 additions and 11 deletions

View File

@ -8,6 +8,7 @@ opt-level = 3
[profile.release]
strip = true
opt-level = 2
[lib]
crate-type = [

View File

@ -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===="