| Crates.io | binary_codec_sv2 |
| lib.rs | binary_codec_sv2 |
| version | 3.0.0 |
| created_at | 2021-06-14 16:54:37.001154+00 |
| updated_at | 2025-09-24 19:21:31.540936+00 |
| description | Sv2 data format |
| homepage | https://stratumprotocol.org |
| repository | https://github.com/stratum-mining/stratum |
| max_upload_size | |
| id | 409997 |
| size | 127,763 |
binary_codec_sv2 is a no_std Rust crate that helps serialize and de-serialize binary data into and from Stratum V2 types.
Encodable, Decodable) for converting between Rust and SV2 data types/structures.U24, U256,Str0255 and rest.no_std Compatibility: Fully supports constrained environments without the Rust standard library.The crate supports the following mappings between Rust and SV2 types
| Rust Type | Sv2 Type |
|---|---|
bool |
BOOL |
u8 |
U8 |
u16 |
U16 |
U24 |
U24 |
u32 |
U32 |
u64 |
U64 |
f32 |
F32 |
Str0255 |
STRO_255 |
Signature |
SIGNATURE |
[u8] |
BYTES |
Seq0255 |
SEQ0_255[T] |
Seq064K |
SEQ0_64K[T] |
Add binary_codec_sv2 to your project by running:
cargo add binary_codec_sv2