Use correct build hook

This commit is contained in:
Jazz Turner-Baggs 2026-02-23 20:20:15 -08:00
parent 803a11ce27
commit a0ee07ccc4
No known key found for this signature in database

View File

@ -13,9 +13,14 @@ bin = @["libchat"]
requires "nim >= 2.2.4"
requires "results"
# Build Rust library before compiling Nim
before build:
proc buildRust() =
exec "cargo build --release --manifest-path ../Cargo.toml"
# Build Rust library before compiling Nim
before build:
buildRust()
task pingpong, "Run pingpong example":
buildRust()
exec "nim c -r --path:src --passL:../target/release/liblibchat.a examples/pingpong.nim"