chore: provide custom nwaku

This commit is contained in:
Igor Sirotin 2025-09-24 22:34:00 +01:00
parent d1360e26f7
commit eb8b0aec95
No known key found for this signature in database
GPG Key ID: 0EABBCB40CB9AD4A
2 changed files with 7 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# Makefile for Waku Go Bindings
# Directories
THIRD_PARTY_DIR := ../third_party
THIRD_PARTY_DIR := $(shell pwd)/../third_party
NWAKU_REPO := https://github.com/waku-org/nwaku
NWAKU_DIR := $(THIRD_PARTY_DIR)/nwaku
@ -31,7 +31,10 @@ build-libwaku: prepare
@cd $(NWAKU_DIR) && make libwaku
# Build Waku Go Bindings
build: build-libwaku
build: export CGO_CFLAGS = "-I${NWAKU_DIR}/library/"
build: export CGO_LDFLAGS = "-L${NWAKU_DIR}/build/ -lwaku -L${NWAKU_DIR} -Wl,-rpath,${NWAKU_DIR}/build/"
build:
@echo "Building Waku Go Bindings..."
go build ./...

View File

@ -1,10 +1,7 @@
package waku
/*
#cgo LDFLAGS: -L../third_party/nwaku/build/ -lwaku
#cgo LDFLAGS: -L../third_party/nwaku -Wl,-rpath,../third_party/nwaku/build/
#include "../third_party/nwaku/library/libwaku.h"
#include "libwaku.h"
#include <stdio.h>
#include <stdlib.h>
@ -348,6 +345,7 @@ import (
"github.com/multiformats/go-multiaddr"
"github.com/waku-org/go-waku/waku/v2/protocol/pb"
"github.com/waku-org/go-waku/waku/v2/utils"
"github.com/waku-org/waku-go-bindings/waku/common"
)