$ borsh
v1.6.1Binary Object Representation Serializer for Hashing
Latest Update Summary
Crate
Name: borsh New version: 1.6.0 Release date: 2025-11-25T16:36:01.763012Z
Crate readme
Short description Rust implementation of the Borsh binary serialization format.
Long description Borsh stands for Binary Object Representation Serializer for Hashing. It is meant to be used in security-critical projects as it prioritizes consistency, safety, speed, and comes with a strict specification.
Features • security-critical projects • consistency • safety • speed • strict specification
Code Examples Basic usage
use borsh::{BorshSerialize, BorshDeserialize, from_slice, to_vec};
#[derive(BorshSerialize, BorshDeserialize, PartialEq, Debug)]
struct A {
x: u64,
y: String,
}
#[test]
fn test_simple_struct() {
let a = A {
x: 3301,
y: "liber primus".to_string(),
};
let encoded_a = to_vec(&a).unwrap();
let decoded_a = from_slice::<A>(&encoded_a).unwrap();
assert_eq!(a, decoded_a);
}
Links • https://crates.io/crates/borsh • https://github.com/near/borsh#specification • https://github.com/near/borsh-rs/blob/master/Cargo.toml
https://api.github.com/repos/near/borsh-rs/releases/265195707
Release info
Release version:
Release description
Code Examples
Patch update: 1.6.0 → 1.6.1
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add borshOr add to Cargo.toml: borsh = "1.6.1"