2024-11-27 12:08:50 +02:00
# Waku Go Bindings
2025-09-30 16:50:58 +01:00
This repository provides Go bindings for the Waku library, enabling seamless integration with Go projects.
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
## Installation
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
To build the required dependencies for this module, the `make` command needs to be executed. If you are integrating this module into another project via `go get` , ensure that you navigate to the `waku-go-bindings` module directory and run `make` .
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
### Steps to Install
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
Follow these steps to install and set up the module:
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
1. Make sure your system has the [prerequisites ](https://docs.waku.org/guides/nwaku/build-source#prerequisites ) to run a local nwaku node
2025-01-22 18:58:40 +01:00
2025-09-30 16:50:58 +01:00
2. Retrieve the module using `go get` :
```
go get -u github.com/waku-org/waku-go-bindings
```
3. Navigate to the module's directory:
```
cd $(go list -m -f '{{.Dir}}' github.com/waku-org/waku-go-bindings)
```
4. Prepare third_party directory and clone nwaku
```
sudo mkdir third_party
sudo chown $USER third_party
```
5. Build the dependencies:
```
make -C waku
```
2024-11-27 12:08:50 +02:00
2025-09-30 16:50:58 +01:00
Now the module is ready for use in your project.
2025-03-13 15:22:58 +02:00
2025-09-30 16:50:58 +01:00
### Note
2025-03-13 15:22:58 +02:00
2025-09-30 16:50:58 +01:00
In order to easily build the libwaku library on demand, it is recommended to add the following target in your project's Makefile:
2025-03-13 15:22:58 +02:00
2025-09-30 16:50:58 +01:00
```
LIBWAKU_DEP_PATH=$(shell go list -m -f '{{.Dir}}' github.com/waku-org/waku-go-bindings)
2025-03-13 15:22:58 +02:00
2025-09-30 16:50:58 +01:00
buildlib:
cd $(LIBWAKU_DEP_PATH) & & \
sudo mkdir -p third_party & & \
sudo chown $(USER) third_party & & \
make -C waku
```
2025-03-26 16:29:51 +02:00
2025-09-30 16:50:58 +01:00
## Example Usage
2025-03-26 16:29:51 +02:00
2025-09-30 16:50:58 +01:00
For an example on how to use this package, please take a look at our [example-go-bindings ](https://github.com/gabrielmer/example-waku-go-bindings ) repo