mirror of
https://github.com/logos-messaging/logos-delivery-rust-bindings.git
synced 2026-05-17 18:39:32 +00:00
Revert "chore: align with logos-delivery"
This reverts commit 8abc430b01d03d90ca8ac20cdb6e761da9e51a1e.
This commit is contained in:
parent
8abc430b01
commit
0bf7c2b9bd
1726
Cargo.lock
generated
1726
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
1603
examples/Cargo.lock
generated
1603
examples/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,6 @@ impl App<Initialized> {
|
|||||||
tcp_port: Some(60010),
|
tcp_port: Some(60010),
|
||||||
cluster_id: Some(16),
|
cluster_id: Some(16),
|
||||||
shards: vec![1, 32, 64, 128, 256],
|
shards: vec![1, 32, 64, 128, 256],
|
||||||
num_shards_in_network: Some(0), // static sharding for explicit RS shard indices
|
|
||||||
// node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()),
|
// node_key: Some(SecretKey::from_str("2fc0515879e52b7b73297cfd6ab3abf7c344ef84b7a90ff6f4cc19e05a198027").unwrap()),
|
||||||
max_message_size: Some("1024KiB".to_string()),
|
max_message_size: Some("1024KiB".to_string()),
|
||||||
relay_topics: vec![String::from(&pubsub_topic)],
|
relay_topics: vec![String::from(&pubsub_topic)],
|
||||||
@ -118,9 +117,6 @@ impl App<Initialized> {
|
|||||||
WakuEvent::ConnectionChange(_evt) => {
|
WakuEvent::ConnectionChange(_evt) => {
|
||||||
// dbg!("Conn change evt", evt);
|
// dbg!("Conn change evt", evt);
|
||||||
},
|
},
|
||||||
WakuEvent::NodeHealthChange(_evt) => {
|
|
||||||
// dbg!("Node health change evt", evt);
|
|
||||||
},
|
|
||||||
WakuEvent::Unrecognized(err) => eprintln!("Unrecognized waku event: {:?}", err),
|
WakuEvent::Unrecognized(err) => eprintln!("Unrecognized waku event: {:?}", err),
|
||||||
_ => eprintln!("event case not expected"),
|
_ => eprintln!("event case not expected"),
|
||||||
};
|
};
|
||||||
|
|||||||
@ -31,6 +31,7 @@ url = "2.3"
|
|||||||
waku-sys = { version = "1.0.0", path = "../waku-sys" }
|
waku-sys = { version = "1.0.0", path = "../waku-sys" }
|
||||||
libc = "0.2"
|
libc = "0.2"
|
||||||
serde-aux = "4.3.1"
|
serde-aux = "4.3.1"
|
||||||
|
rln = "0.3.4"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
regex = "1"
|
regex = "1"
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
|
|||||||
@ -8,6 +8,12 @@ pub mod node;
|
|||||||
// Re-export the LibwakuResponse type to make it accessible outside this module
|
// Re-export the LibwakuResponse type to make it accessible outside this module
|
||||||
pub use general::libwaku_response::LibwakuResponse;
|
pub use general::libwaku_response::LibwakuResponse;
|
||||||
|
|
||||||
|
// Required so functions inside libwaku can call RLN functions even if we
|
||||||
|
// use it within the bindings functions
|
||||||
|
#[allow(clippy::single_component_path_imports)]
|
||||||
|
#[allow(unused)]
|
||||||
|
use rln;
|
||||||
|
|
||||||
pub use node::{
|
pub use node::{
|
||||||
waku_create_content_topic, waku_new, Initialized, Key, Multiaddr, PublicKey, RLNConfig,
|
waku_create_content_topic, waku_new, Initialized, Key, Multiaddr, PublicKey, RLNConfig,
|
||||||
Running, SecretKey, WakuEvent, WakuMessageEvent, WakuNodeConfig, WakuNodeHandle,
|
Running, SecretKey, WakuEvent, WakuMessageEvent, WakuNodeConfig, WakuNodeHandle,
|
||||||
|
|||||||
@ -30,12 +30,6 @@ pub struct WakuNodeConfig {
|
|||||||
pub relay_topics: Vec<String>,
|
pub relay_topics: Vec<String>,
|
||||||
#[default(vec![0])]
|
#[default(vec![0])]
|
||||||
pub shards: Vec<usize>,
|
pub shards: Vec<usize>,
|
||||||
/// Number of shards in the cluster for auto-sharding. Set to `0` to use
|
|
||||||
/// static sharding (required when subscribing to explicit RS shard indices
|
|
||||||
/// such as those used by the Status.im production network).
|
|
||||||
/// Defaults to `None` (Nim will use its own default of 1).
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub num_shards_in_network: Option<u16>,
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub max_message_size: Option<String>,
|
pub max_message_size: Option<String>,
|
||||||
|
|
||||||
|
|||||||
@ -120,22 +120,6 @@ fn generate_bindgen_code(project_dir: &Path) {
|
|||||||
.compile("cmditems"); // Compile it as a library
|
.compile("cmditems"); // Compile it as a library
|
||||||
println!("cargo:rustc-link-lib=static=cmditems");
|
println!("cargo:rustc-link-lib=static=cmditems");
|
||||||
|
|
||||||
// Link librln.a (built from vendored zerokit by the Nim Makefile).
|
|
||||||
// The Rust `rln` crate is not used as a dependency because its older
|
|
||||||
// versions (0.3.x) pulled in wasmer 2.x which references __rust_probestack,
|
|
||||||
// a symbol removed in Rust 1.86. Instead, we link the prebuilt librln_*.a
|
|
||||||
// directly, which is the same artifact that libwaku.a was compiled against.
|
|
||||||
if let Ok(entries) = std::fs::read_dir(&nwaku_path) {
|
|
||||||
for entry in entries.flatten() {
|
|
||||||
let name = entry.file_name();
|
|
||||||
let name = name.to_string_lossy();
|
|
||||||
if name.starts_with("librln_") && name.ends_with(".a") {
|
|
||||||
println!("cargo:rustc-link-arg={}", entry.path().display());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Generate waku bindings with bindgen
|
// Generate waku bindings with bindgen
|
||||||
let bindings = bindgen::Builder::default()
|
let bindings = bindgen::Builder::default()
|
||||||
// The input header we would like to generate
|
// The input header we would like to generate
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user