mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-13 19:33:05 +00:00
28 lines
622 B
Rust
28 lines
622 B
Rust
mod events;
|
|
mod general;
|
|
mod node_management;
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use std::ffi::CStr;
|
|
use std::os::raw::c_char;
|
|
use waku_sys::waku_content_topic;
|
|
|
|
#[test]
|
|
fn content_topic() {
|
|
let topic = unsafe {
|
|
waku_content_topic(
|
|
"foo_bar".as_ptr() as *mut c_char,
|
|
1,
|
|
"foo_topic".as_ptr() as *mut c_char,
|
|
"rfc26".as_ptr() as *mut c_char,
|
|
)
|
|
};
|
|
|
|
let topic_str = unsafe { CStr::from_ptr(topic) }
|
|
.to_str()
|
|
.expect("Decoded return");
|
|
println!("{}", topic_str);
|
|
}
|
|
}
|