Compare commits

..

2 Commits

Author SHA1 Message Date
Christopher Arndt 5a6a55f071 feat: add simple nimble file
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2022-10-06 04:43:00 +02:00
Christopher Arndt 896768696b fix: use let instead of var in example
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
2022-10-06 04:42:42 +02:00
2 changed files with 13 additions and 1 deletions

View File

@ -7,10 +7,12 @@ var status: cint
proc cleanup() {.noconv.} =
echo "Cleaning up..."
if client != nil:
discard deactivate(client)
discard clientClose(client)
client = nil
quit 0
proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer) {.exportc.} =
@ -29,7 +31,7 @@ proc portConnected(portA: PortIdT; portB: PortIdT; connect: cint; arg: pointer)
else:
echo "Port B: <unknown>"
var action = if connect > 0: "connect" else: "disconnect"
let action = if connect > 0: "connect" else: "disconnect"
echo fmt"Action: {action}"

10
jacket.nimble Normal file
View File

@ -0,0 +1,10 @@
# Package
version = "0.1.0"
author = "Christopher Arndt"
description = "A Nim wrapper for the JACK C API"
license = "MIT"
# Dependencies
requires "nim >= 1.6.0"