| Crates.io | tari_bor |
| lib.rs | tari_bor |
| version | 0.11.1 |
| created_at | 2023-11-22 08:29:20.140096+00 |
| updated_at | 2025-09-25 04:43:04.489601+00 |
| description | The binary object representation (BOR) crate provides a binary encoding for template/engine data types |
| homepage | |
| repository | https://github.com/tari-project/tari-ootle |
| max_upload_size | |
| id | 1044971 |
| size | 44,464 |
tari_bortari_bor is the low-level self-describing Binary Object Representation (BOR) used in Tari.
It provides a thin api over the ciborium crate.
use tari_bor::serialize;
fn main() {
#[derive(serde::Serialize, serde::Deserialize, Debug)]
struct TestCase {
bytes: Vec<u8>,
pk: String,
}
let test_case = TestCase {
bytes: vec![1, 2, 3, 4, 5],
pk: RistrettoPublicKeyBytes::from([1; 32]),
};
let encoded = tari_bor::encode(&test_case).unwrap();
let decoded: TestCase = tari_bor::decode(&encoded).unwrap();
}
Detailed documentation is available at docs.rs/tari_bor.