Ivan Folgueira Bande 66d751d3e4
waku-sys new approach to allow smaller crate packages
* REAME.md explain how to build libwaku.a
* update nwaku vendor to use the optimized libwaku size changes
* remove vendor/vendor after creating the package
* Cargo.toml to reflect correct files
* persisting waku libraries, build-libwaku.sh script, and libwaku.h
* simplify build.rs accordingly
2025-01-16 19:17:25 +01:00
..
2024-11-28 10:35:41 +01:00
2022-11-28 17:57:20 +01:00
2022-11-28 17:57:20 +01:00

Waku rust bindgen bindings

github crates.io docs.rs build status

Rust layer on top of nwaku c ffi bindings.

Usage

These are autogenerated, if you are looking for a proper Rust API version check on waku-bindings

Add this to your Cargo.toml:

[dependencies]
waku-sys = "0.1.0"

About Waku

Waku is the communication layer for Web3. Decentralized communication that scales.

Private. Secure. Runs anywhere.

What is Waku?

Waku is a suite of privacy-preserving, peer-to-peer messaging protocols.

Waku removes centralized third parties from messaging, enabling private, secure, censorship-free communication with no single point of failure.

Waku provides privacy-preserving capabilities, such as sender anonymity,metadata protection and unlinkability to personally identifiable information.

Waku is designed for generalized messaging, enabling human-to-human, machine-to-machine or hybrid communication.

Waku runs everywhere: desktop, server, including resource-restricted devices, such as mobile devices and browsers. How does it work?

The first version of Waku had its origins in the Whisper protocol, with optimizations for scalability and usability. Waku v2 is a complete rewrite. Its relay protocol implements pub/sub over libp2p, and also introduces additional capabilities:

  1. Retrieving historical messages for mostly-offline devices.
  2. Adaptive nodes, allowing for heterogeneous nodes to contribute.
  3. Bandwidth preservation for light nodes.

This makes it ideal for running a p2p protocol on mobile, or in other similarly resource-restricted environments.

Read the Waku docs

Compile waku-sys crate

The waku-sys crate is a wrapper on top of nwaku. This has nwaku a submodule within the vendor folder and, we need to manually compile the libwaku.a file. The build.rs file assumes the libwaku.a already exists.

Compile libwaku.a

In Linux, do:

bash build-libwaku.sh

and that should create the needed files in waku-sys/libwaku folder. Notice that these files should be committed in order to create a waku-sys package.