@@ -187,10 +187,15 @@ nimbus-build-system-nimble-dir:
187187# #################
188188# # RLN ##
189189# #################
190- .PHONY : librln
190+ .PHONY : librln mix-librln
191191
192192LIBRLN_BUILDDIR := $(CURDIR ) /vendor/zerokit
193193LIBRLN_VERSION := v0.9.0
194+ MIX_LIBRLN_VERSION ?= v2.0.0
195+ MIX_LIBRLN_REPO ?= https://github.com/vacp2p/zerokit.git
196+ MIX_LIBRLN_SRCDIR ?= $(CURDIR ) /build/zerokit_$(MIX_LIBRLN_VERSION )
197+ MIX_LIBRLN_FILE ?= $(CURDIR ) /build/librln_mix_$(MIX_LIBRLN_VERSION ) .a
198+ MIX_LIBRLN_NIM_PARAMS := --passL:$(MIX_LIBRLN_FILE ) --passL:-lm
194199
195200ifeq ($(detected_OS ) ,Windows)
196201LIBRLN_FILE ?= rln.lib
@@ -202,12 +207,19 @@ $(LIBRLN_FILE):
202207 echo -e $(BUILD_MSG ) " $@ " && \
203208 ./scripts/build_rln.sh $(LIBRLN_BUILDDIR ) $(LIBRLN_VERSION ) $(LIBRLN_FILE )
204209
210+ $(MIX_LIBRLN_FILE ) :
211+ echo -e $(BUILD_MSG ) " $@ " && \
212+ ./scripts/build_rln_mix.sh $(MIX_LIBRLN_SRCDIR ) $(MIX_LIBRLN_VERSION ) $(MIX_LIBRLN_FILE ) $(MIX_LIBRLN_REPO )
213+
205214librln : | $(LIBRLN_FILE )
206215 $(eval NIM_PARAMS += --passL:$(LIBRLN_FILE ) --passL:-lm)
207216
217+ mix-librln : | $(MIX_LIBRLN_FILE )
218+
208219clean-librln :
209220 cargo clean --manifest-path vendor/zerokit/rln/Cargo.toml
210221 rm -f $(LIBRLN_FILE )
222+ rm -f $(MIX_LIBRLN_FILE )
211223
212224# Extend clean target
213225clean : | clean-librln
@@ -232,10 +244,10 @@ testwaku: | build deps rln-deps librln
232244 echo -e $(BUILD_MSG ) " build/$@ " && \
233245 $(ENV_SCRIPT ) nim test -d:os=$(shell uname) $(NIM_PARAMS ) waku.nims
234246
235- wakunode2 : | build deps librln
247+ wakunode2 : | build deps librln mix-librln
236248 echo -e $(BUILD_MSG ) " build/$@ " && \
237249 \
238- $(ENV_SCRIPT ) nim wakunode2 $(NIM_PARAMS ) waku.nims
250+ $(ENV_SCRIPT ) nim wakunode2 $(NIM_PARAMS ) $( MIX_LIBRLN_NIM_PARAMS ) waku.nims
239251
240252benchmarks : | build deps librln
241253 echo -e $(BUILD_MSG ) " build/$@ " && \
@@ -253,9 +265,9 @@ chat2: | build deps librln
253265 echo -e $(BUILD_MSG ) " build/$@ " && \
254266 $(ENV_SCRIPT ) nim chat2 $(NIM_PARAMS ) waku.nims
255267
256- chat2mix : | build deps librln
268+ chat2mix : | build deps librln mix-librln
257269 echo -e $(BUILD_MSG ) " build/$@ " && \
258- $(ENV_SCRIPT ) nim chat2mix $(NIM_PARAMS ) waku.nims
270+ $(ENV_SCRIPT ) nim chat2mix $(NIM_PARAMS ) $( MIX_LIBRLN_NIM_PARAMS ) waku.nims
259271
260272rln-db-inspector : | build deps librln
261273 echo -e $(BUILD_MSG ) " build/$@ " && \
0 commit comments