Go implementation of Waku v2 protocol
Go to file
Jakub Sokołowski 349e22bbe8
nix: add Nix flake to build node and library
This way we can build node or the library locally using:
```sh
nix build
nix build .#node
nix build .#library
```
Or just start a shell with Go `1.19.x` using:
```
nix develop
```
Which simply has the same environment as the build shell for the node.

One known snag is that there is currently no simple way to keep `vendorSha256`
updated to match the contents of `go.mod` and `go.sum`. For more details see:
https://discourse.nixos.org/t/how-should-i-build-a-go-package-from-local-source/19490/8

One way around this would be to have our own `vendor` folder, but that's
also a pretty ugly solution that requires manual updating.

Resolves:
https://github.com/waku-org/go-waku/issues/256

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-03-05 15:04:07 +01:00
.github/workflows Add CodeQL workflow for GitHub code scanning 2022-12-06 13:46:12 -04:00
build chore: release (#255) 2022-06-19 17:50:37 -04:00
ci nix: add Nix flake to build node and library 2023-03-05 15:04:07 +01:00
cmd/waku feat: improvements on filter protocol (server) 2023-02-15 17:36:30 -04:00
coverage fix: jenkinscript (#304) 2022-09-12 10:13:38 -04:00
docs refactor: improve store iterator 2023-01-08 13:55:51 -04:00
examples fix: deps 2023-03-01 20:28:35 -04:00
hooks feat: add git hook 2021-10-18 14:43:48 +02:00
library fix: protocolID must be a string in the mobile API (#466) 2023-02-20 17:50:36 -04:00
logging chore: switch to Google's Protobuf library 2023-02-16 11:37:59 -04:00
mobile fix: protocolID must be a string in the mobile API (#466) 2023-02-20 17:50:36 -04:00
pkg chore: release (#255) 2022-06-19 17:50:37 -04:00
scripts/linux chore: setup linux ci for .deb 2022-12-06 15:48:48 -04:00
tests refactor: peer discovery management for discv5 and peer exchange 2023-01-17 17:40:48 -04:00
waku feat: add meta field to WakuMessage 2023-03-04 13:27:36 -04:00
.dockerignore Dockerfile: add commit, log format, and make target (#83) 2021-10-15 12:47:23 +02:00
.gitignore nix: add Nix flake to build node and library 2023-03-05 15:04:07 +01:00
.gitmodules chore: use static rln lib and fix lint 2022-08-15 14:40:10 -04:00
.golangci.yaml feat: use generic flags and convert values to specific data types 2022-08-15 15:22:13 -04:00
CHANGELOG.md Initial commit 2021-03-11 16:27:12 -04:00
Dockerfile chore: rename status-im/go-waku to waku-org/go-waku 2022-11-09 16:03:40 -04:00
LICENSE-APACHEv2 Initial commit 2021-03-11 16:27:12 -04:00
LICENSE-MIT Initial commit 2021-03-11 16:27:12 -04:00
Makefile chore: switch to Google's Protobuf library 2023-02-16 11:37:59 -04:00
README.md nix: add Nix flake to build node and library 2023-03-05 15:04:07 +01:00
VERSION feat: 0.5.1 (#467) 2023-02-20 17:53:02 -04:00
flake.lock nix: add Nix flake to build node and library 2023-03-05 15:04:07 +01:00
flake.nix nix: add Nix flake to build node and library 2023-03-05 15:04:07 +01:00
go.mod fix: deps 2023-03-01 20:28:35 -04:00
go.sum fix: deps 2023-03-01 20:28:35 -04:00

README.md

go-waku

A Go implementation of the Waku v2 protocol.

Total alerts

Install

Building from source

git clone https://github.com/waku-org/go-waku
cd go-waku
make

# See the available command line options with
./build/waku --help

Nix

You can build Waku v2 node using Nix Flakes:

nix build github:waku-org/go-waku

Or build the library using:

nix build github:waku-org/go-waku#library

To start a shell with build dependencies use:

nix develop

Docker

docker build -t go-waku:latest .

docker run go-waku:latest --help

Building on windows

Windows requires the following tools to be installed

Library

go get github.com/waku-org/go-waku

C Bindings

make static-library
make dynamic-library

Mobile libraries

Requires gomobile

make mobile-android
make mobile-ios

Tutorials and documentation

Examples

Examples of usage of go-waku as a library can be found in the examples/ folder:

  • basic2 - demonstrates how to send and receive messages
  • chat2 - simple chat client using waku relay / lightpush + filter / store protocol to send/receive messages and retrieve message history
  • filter2 - demonstrates how to use filter protocol
  • c-bindings - simple program to demonstrate how to consume the go-waku library via C FFI
  • waku-csharp - C# console application that uses the go-waku library via FFI
  • android-kotlin - android app that uses a .jar generated by gomobile using kotlin

Contribution

Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes!

If you'd like to contribute to go-waku, please fork, fix, commit and send a pull request. If you wish to submit more complex changes though, please check up with the core devs first to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple.

To build and test this repository, you need:

To enable the git hooks:

git config core.hooksPath hooks

Bugs, Questions & Features

If you encounter any bug or would like to propose new features, feel free to open an issue.

For more general discussion, help and latest news, join #go-waku on Vac Discord or Telegram.

License

Licensed and distributed under either of

or

at your option. These files may not be copied, modified, or distributed except according to those terms.