2026-01-29 01:38:08 +07:00
|
|
|
# Package
|
|
|
|
|
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
author = "libchat"
|
|
|
|
|
description = "Nim Bindings for LibChat"
|
|
|
|
|
license = "MIT"
|
|
|
|
|
srcDir = "src"
|
|
|
|
|
bin = @["libchat"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
|
|
|
|
|
|
requires "nim >= 2.2.4"
|
|
|
|
|
requires "results"
|
|
|
|
|
|
2026-02-24 15:28:02 -08:00
|
|
|
proc buildRust() =
|
|
|
|
|
exec "cargo build --release --manifest-path ../Cargo.toml"
|
|
|
|
|
|
|
|
|
|
|
2026-01-29 01:38:08 +07:00
|
|
|
# Build Rust library before compiling Nim
|
|
|
|
|
before build:
|
2026-02-24 15:28:02 -08:00
|
|
|
buildRust()
|
2026-01-29 01:38:08 +07:00
|
|
|
|
|
|
|
|
task pingpong, "Run pingpong example":
|
2026-02-24 15:28:02 -08:00
|
|
|
buildRust()
|
2026-02-23 20:54:34 +01:00
|
|
|
exec "nim c -r --path:src --passL:../target/release/liblibchat.a examples/pingpong.nim"
|