From 8488fa343cc995711bf161e4531c2edf26ffa3a4 Mon Sep 17 00:00:00 2001 From: Emil Ivanichkov Date: Wed, 10 Jan 2024 22:14:13 +0200 Subject: [PATCH] config(build): Add building utils --- Makefile | 10 ++++++++++ nimbus_node_manager.nims | 29 +++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 nimbus_node_manager.nims diff --git a/Makefile b/Makefile index 26ccb6e..15241ef 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,13 @@ clean-librln: # Extend clean target clean: | clean-librln + +################## +## WAKU UTILS ## +################## + +waku-utils: | librln + nim wakuUtils $(NIM_PARAMS) nimbus_node_manager.nims + +waku-utils-example: | librln + nim wakuUtilsExamples $(NIM_PARAMS) nimbus_node_manager.nims diff --git a/nimbus_node_manager.nims b/nimbus_node_manager.nims new file mode 100644 index 0000000..c324316 --- /dev/null +++ b/nimbus_node_manager.nims @@ -0,0 +1,29 @@ +### Helper functions +proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") = + if not dirExists "build": + mkDir "build" + # allow something like "nim nimbus --verbosity:0 --hints:off nimbus.nims" + var extra_params = params + for i in 2..