| Crates.io | librecast |
| lib.rs | librecast |
| version | 1.0.1 |
| created_at | 2025-06-20 07:47:52.314259+00 |
| updated_at | 2025-06-20 16:34:32.831727+00 |
| description | Rust bindings for the librecast library |
| homepage | |
| repository | https://codeberg.org/ghenry/librecast-rs.git |
| max_upload_size | |
| id | 1719251 |
| size | 82,802 |
librecast-sysTo use librecast, run cargo add librecast like normal, then use it like so:
use librecast::Librecast;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a new librecast context
let librecast = Librecast::new()?;
// Create a channel using the builder pattern
let channel = librecast.channel_builder()
.channel_builder()
.name("test_channel")
.enable_rapterq()
.build()?;
// Join the channel
channel.join()?;
// Send a message
let message = b"Hello, world!";
channel.send(message)?;
// Leave the channel
channel.leave()?;
Ok(())
}
Run this first to start a receiver that listens for messages:
cargo run --example receiver
Then run this to send messages to the receiver, in a separate terminal:
cargo run --example sender
This project is licensed under the GPL-2.0-only or GPL-3.0-only license, at your option.