golang example end using negentropy dependency plus simple readme.md

This commit is contained in:
Ivan Folgueira Bande 2025-01-09 12:40:32 +01:00
parent ba1870d114
commit 4cfa504bf8
2 changed files with 27 additions and 1 deletions

26
examples/golang/README.md Normal file
View File

@ -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
```

View File

@ -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"