12 releases
Uses new Rust 2024
| 0.3.5 | Jan 16, 2026 |
|---|---|
| 0.3.4 | Mar 6, 2025 |
| 0.3.3 | Dec 8, 2024 |
| 0.3.1 | Nov 16, 2024 |
| 0.1.4 | Oct 24, 2024 |
#1315 in Debugging
Used in 2 crates
35KB
568 lines
BulletinBoard Rust Client
The BulletinBoard crate provides an object storage solution for ArrayObject, designed for debugging and data acquisition workflows. For comprehensive documentation, refer to the BulletinBoard repository.
Important Notes
- Client operations do not verify success to maximize performance. Please consult the server logs for error details.
- Data transmission is not encrypted. Do not send confidential information over the network.
- This crate is under development; APIs and specifications may change. Compatibility between
BulletinBoardanddbgbbis maintained for matching minor version numbers. - Running tests will interact with the server and may erase existing data.
Usage Example
Before using bulletin-board-client, deploy a BulletinBoard server and configure the server address via an environment variable. For convenience, set it in your project's .cargo/config.toml:
[env]
BB_ADDR = "ADDRESS:PORT" # Or "PATH" for Unix socket
To post and retrieve bulletins:
use bulletin_board_client as bbclient;
use bbclient::*;
fn main() {
let data: ArrayObject = vec![1f32, 2., -3., 5.].try_into().unwrap();
bbclient::post("x", "tag", data.clone()).unwrap();
let recv = bbclient::read("x", None, vec![]).unwrap().pop().unwrap();
let restored = recv.try_into().unwrap();
assert_eq!(data, restored);
}
To persist data:
use bulletin_board_client as bbclient;
fn main() {
bbclient::archive("acv", "x", Some("tag")).unwrap();
bbclient::reset_server().unwrap(); // Deletes all temporary data.
bbclient::load("acv").unwrap();
dbg!(bbclient::view_board().unwrap());
}
Refer to the documentation for detailed API usage.
Environment Variables
| Variable | Default | Description |
|---|---|---|
| BB_ADDR | "127.0.0.1:7578" | Address of the bulletin board server. Format: [IP address]:[port] or [hostname]:[port]. For Unix sockets, specify the path to the socket. The address can be updated at runtime via set_addr(...). |
| BB_TIMEOUT | Unset | TCP connection timeout. |
Crate Features
| Feature | Description |
|---|---|
ndarray_15 |
Enables support for ndarray version 0.15.x. |
ndarray_16 |
Enables support for ndarray version 0.16.x. |
ndarray_17 |
Enables support for ndarray version 0.17.x. |
nalgebra_33 |
Enables support for nalgebra version 0.33.x. |
nalgebra_34 |
Enables support for nalgebra version 0.34.x. |
dry_run |
Skips all communication with the server. |
Dependencies
~1.4–3MB
~59K SLoC