Ivan FB 98d005c9e1
feat: consume the vendor's generated FFI bindings in waku-sys
nim-ffi 0.2.0 generates the Rust bindings from the Nim source, so
bindgen over the hand-written headers is no longer the source of truth
-- and could not be, since those headers describe the pre-CBOR ABI.

The generated sources are referenced in place under vendor rather than
copied, so regenerating them in logos-delivery flows straight through
with nothing to keep in sync. They stay sibling modules because api.rs
resolves its neighbours through `super::`.

build.rs keeps driving the build: it runs the vendor's make target,
scans for the version-and-hash-named nimble package dirs and librln, and
emits the miniupnpc / natpmp / c++ link flags. The generated build.rs
does none of that (it runs a bare `nim c --mm:orc` against a path that
does not resolve here), so only the bindgen half is dropped.

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

43 lines
1.1 KiB
TOML

[package]
name = "waku-sys"
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 generated bindings"
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"]
exclude = [
"vendor/examples/*",
"vendor/docs/*",
"vendor/coverage/*",
"vendor/pkg/*",
"vendor/tests/*",
"vendor/ci/*",
"vendor/cmd/*",
"**/*.md",
"**/*.lock",
"**/*.nix",
"**/Dockerfile",
]
[lib]
crate-type = ["rlib"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
# Mirrors the Cargo.toml the vendor's genBindings() emits alongside the sources.
[dependencies]
serde = { version = "1", features = ["derive"] }
ciborium = "0.2"
flume = { version = "0.11", default-features = false, features = ["async"] }
tokio = { version = "1", features = ["sync", "time"] }
[build-dependencies]
cc = "1.0.73"