Ivan FB 1b25e5c327
refactor: collapse waku-sys into waku-bindings
waku-sys was a thin -sys crate that only re-exported the generated FFI
sources via #[path] and carried the build. It sat between waku-bindings
and the generated crate for no real benefit -- the generated crate is the
actual -sys equivalent, and its own build.rs cannot build logos-delivery
(bare `nim c`, one link directive). So the wrapper is folded in:

- The build (make liblogosdelivery + the 13 link directives, librln
  discovery, cmd.c) moves into waku-bindings/build.rs.
- waku-bindings pulls the generated ffi/types/api modules directly by
  #[path] into the vendor submodule, which moves from waku-sys/vendor to
  the repo root (vendor/).
- ciborium/flume and the cc build-dep move over; the waku-sys path
  dependency is dropped.

Consumers are unaffected -- they always depended only on waku-bindings.
This is one crate and one layer fewer.

build.rs now also removes a stale build/liblogosdelivery.dylib after the
static build: the generated ffi.rs declares `#[link(name =
"logosdelivery")]` with no kind, so a dylib left by a non-STATIC make
would be linked dynamically over the static archive.

Full suite passes (4 tests + doctest, 1 ignored) and all three examples
build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 16:47:10 +02:00

50 lines
1.5 KiB
TOML

[package]
name = "waku-bindings"
version = "1.0.0"
edition = "2021"
authors = [
"Daniel Sanchez Quiros <danielsq@status.im>",
"Richard Ramos <richard@waku.org>",
"Ivan Folgueira Bande <ivansete@status.im>"
]
description = "Waku networking library"
license = "MIT OR Apache-2.0"
repository = "https://github.com/logos-messaging/logos-messaging-rust-bindings"
keywords = ["waku", "peer-to-peer", "libp2p", "networking"]
categories = ["network-programming"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
aes-gcm = { version = "0.10", features = ["aes"] }
base64 = "0.21"
enr = { version = "0.7", features = ["serde", "rust-secp256k1"] }
hex = "0.4"
multiaddr = "0.17"
once_cell = "1.15"
rand = "0.8"
secp256k1 = { version = "0.26", features = ["rand", "recovery", "serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
sscanf = "0.4"
smart-default = "0.6"
url = "2.3"
libc = "0.2"
serde-aux = "4.3.1"
rln = "0.3.4"
tokio = { version = "1", features = ["full"] }
regex = "1"
chrono = "0.4"
uuid = { version = "1.3", features = ["v4"] }
# Runtime deps of the generated FFI bindings (formerly waku-sys), now consumed
# directly from the vendor submodule.
ciborium = "0.2"
flume = { version = "0.11", default-features = false, features = ["async"] }
[build-dependencies]
cc = "1.0.73"
[dev-dependencies]
futures = "0.3.25"
serial_test = "1.0.0"
tokio = { version = "1.24.2", features = ["macros", "rt", "sync", "time"] }