mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-02 14:03:06 +00:00
In the `when isMainModule:` section of wakunode2.nim, the module `./storage/message/waku_message_store` is imported, which in turn imports waku's sqlite module and also the sqlite3_abi module from `vendor/`. Outside of the `when isMainModule:` section, imports from waku's sqlite module are not used in wakunode2. However, importing it at the top-level results in the C code underlying sqlite3_abi to be compiled into whatever executable one is building, and this is a problem if nim-waku is being consumed together with another library, e.g. nim-sqlcipher, which links against a different build of sqlite (sqlcipher being a superset of sqlite). The linker step fails with reports of duplicate symbols for sqlite.
nim-waku
Introduction
The nim-waku repository implements Waku v1 and v2, and provides tools related to it.
- A Nim implementation of the Waku v1 protocol.
- A Nim implementation of the Waku v2 protocol.
- CLI applications
wakunodeandwakunode2that allows you to run a Waku v1 or v2 node. - Examples of Waku v1 and v2 usage.
- Various tests of above.
For more details on Waku v1 and v2, see their respective home folders:
How to Build & Run
These instructions are generic and apply to both Waku v1 and v2. For more detailed instructions, see Waku v1 and v2 home above.
Prerequisites
- GNU Make, Bash and the usual POSIX utilities. Git 2.9.4 or newer.
- Rust
More information on the installation of these can be found here.
Wakunode
# The first `make` invocation will update all Git submodules.
# You'll run `make update` after each `git pull`, in the future, to keep those submodules up to date.
make wakunode1 wakunode2
# See available command line options
./build/wakunode --help
./build/wakunode2 --help
# Connect the client directly with the Status test fleet
./build/wakunode --log-level:debug --discovery:off --fleet:test --log-metrics
# TODO Equivalent for v2
Waku Protocol Test Suite
# Run all the Waku v1 and v2 tests
make test
Examples
Examples can be found in the examples folder. For Waku v2, there is a fully featured chat example.
Description
Languages
Nim
97%
Shell
1.1%
Makefile
0.6%
Groovy
0.3%
Python
0.3%
Other
0.6%