initial setup

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

View File

@ -6,6 +6,9 @@ edition = "2021"
[profile.dev]
opt-level = 3
[profile.release]
strip = true
[lib]
crate-type = [
"staticlib", # Ensure it gets compiled as a (static) C library

View File

@ -1,11 +1,22 @@
import std/os
const
currentDir = currentSourcePath().parentDir()
lib_path* = currentDir/"target"/"release"/"libcodex_storage_proofs.a"
static:
let pth = currentSourcePath().parentDir()
echo "\n===="
echo "CODEX:STORAGE:PROOFS: ", pth
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 (output, exitCode) = gorgeEx cmd
echo output
if exitCode != 0:
# discard gorge "rm -rf " & buildDir
raise (ref Defect)(msg: "Failed to build codex-storage-proofs")
echo "\n===="