From 4cfa504bf813c4ba8cefe140a0cf68d62dd4f721 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Thu, 9 Jan 2025 12:40:32 +0100 Subject: [PATCH] golang example end using negentropy dependency plus simple readme.md --- examples/golang/README.md | 26 ++++++++++++++++++++++++++ examples/golang/waku.go | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 examples/golang/README.md diff --git a/examples/golang/README.md b/examples/golang/README.md new file mode 100644 index 000000000..ddcf720f1 --- /dev/null +++ b/examples/golang/README.md @@ -0,0 +1,26 @@ + +## Pre-requisite +libwaku.so is needed to be compiled and present in build folder. To create it: +```code +make POSTGRES=1 libwaku -j4 +``` + +## Compilation + +From nwaku root folder, do + +```code +go build -o waku-go examples/golang/waku.go +``` + +## Run +From the nwaku root folder: + + +```code +export LD_LIBRARY_PATH=build +``` + +```code +./waku-go +``` diff --git a/examples/golang/waku.go b/examples/golang/waku.go index ad7c40b34..846362dfe 100644 --- a/examples/golang/waku.go +++ b/examples/golang/waku.go @@ -1,7 +1,7 @@ package main /* - #cgo LDFLAGS: -L../../build/ -lwaku -lnegentropy + #cgo LDFLAGS: -L../../build/ -lwaku #cgo LDFLAGS: -L../../ -Wl,-rpath,../../ #include "../../library/libwaku.h"