bulletin-board-client

Crates.iobulletin-board-client
lib.rsbulletin-board-client
version0.3.5
created_at2024-10-13 20:29:51.331959+00
updated_at2026-01-16 15:21:24.667276+00
descriptionRust client for BulletinBoard
homepage
repositoryhttps://github.com/YShoji-HEP/BulletinBoard
max_upload_size
id1407661
size45,696
Yutaro Shoji (YShoji-HEP)

documentation

README

BulletinBoard Rust Client

"Buy Me A Coffee" "GitHub Sponsors" Crates.io Crates.io License

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 BulletinBoard and dbgbb is 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.
Commit count: 55

cargo fmt