From 1f01b0063ebf415b67a56366e72d75f32fcc6098 Mon Sep 17 00:00:00 2001 From: Ivan FB Date: Sun, 10 May 2026 11:44:27 +0200 Subject: [PATCH] fix compilation issue --- ffi.nimble | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ffi.nimble b/ffi.nimble index 4489c7b..8dc08f4 100644 --- a/ffi.nimble +++ b/ffi.nimble @@ -25,7 +25,6 @@ task test, "Run all tests under --mm:orc and --mm:refc": exec "nim c -r " & flags & " tests/test_gc_compat.nim" exec "nim c -r " & flags & " tests/test_serial.nim" - task test_alloc, "Run alloc unit tests under --mm:orc and --mm:refc": exec "nim c -r " & nimFlagsOrc & " tests/test_alloc.nim" exec "nim c -r " & nimFlagsRefc & " tests/test_alloc.nim" @@ -35,13 +34,21 @@ task test_ffi, "Run FFI context integration tests under --mm:orc and --mm:refc": exec "nim c -r " & nimFlagsRefc & " tests/test_ffi_context.nim" task test_serial, "Run serial unit tests": - exec "nim c -r " & nimFlags & " tests/test_serial.nim" + exec "nim c -r " & nimFlagsOrc & " tests/test_serial.nim" + exec "nim c -r " & nimFlagsRefc & " tests/test_serial.nim" task genbindings_example, "Generate Rust bindings for the nim_timer example": - exec "nim c " & nimFlags & " --app:lib --noMain --nimMainPrefix:libnimtimer -d:ffiGenBindings -o:/dev/null examples/nim_timer/nim_timer.nim" + exec "nim c " & nimFlagsOrc & " --app:lib --noMain --nimMainPrefix:libnimtimer -d:ffiGenBindings -o:/dev/null examples/nim_timer/nim_timer.nim" + exec "nim c " & nimFlagsRefc & " --app:lib --noMain --nimMainPrefix:libnimtimer -d:ffiGenBindings -o:/dev/null examples/nim_timer/nim_timer.nim" task genbindings_rust, "Generate Rust bindings for the nim_timer example": - exec "nim c " & nimFlags & + exec "nim c " & nimFlagsOrc & + " --app:lib --noMain --nimMainPrefix:libnimtimer" & + " -d:ffiGenBindings -d:targetLang=rust" & + " -d:ffiOutputDir=examples/nim_timer/rust_bindings" & + " -d:ffiNimSrcRelPath=../nim_timer.nim" & + " -o:/dev/null examples/nim_timer/nim_timer.nim" + exec "nim c " & nimFlagsRefc & " --app:lib --noMain --nimMainPrefix:libnimtimer" & " -d:ffiGenBindings -d:targetLang=rust" & " -d:ffiOutputDir=examples/nim_timer/rust_bindings" & @@ -49,7 +56,13 @@ task genbindings_rust, "Generate Rust bindings for the nim_timer example": " -o:/dev/null examples/nim_timer/nim_timer.nim" task genbindings_cpp, "Generate C++ bindings for the nim_timer example": - exec "nim c " & nimFlags & + exec "nim c " & nimFlagsOrc & + " --app:lib --noMain --nimMainPrefix:libnimtimer" & + " -d:ffiGenBindings -d:targetLang=cpp" & + " -d:ffiOutputDir=examples/nim_timer/cpp_bindings" & + " -d:ffiNimSrcRelPath=../nim_timer.nim" & + " -o:/dev/null examples/nim_timer/nim_timer.nim" + exec "nim c " & nimFlagsRefc & " --app:lib --noMain --nimMainPrefix:libnimtimer" & " -d:ffiGenBindings -d:targetLang=cpp" & " -d:ffiOutputDir=examples/nim_timer/cpp_bindings" &