| Crates.io | shrink_wrap |
| lib.rs | shrink_wrap |
| version | 0.1.2 |
| created_at | 2025-12-21 15:50:04.896553+00 |
| updated_at | 2026-01-07 16:26:18.512651+00 |
| description | Compact zero-copy wire format for microcontrollers using no allocator and supporting dynamic types. |
| homepage | |
| repository | https://github.com/romixlab/shrink_wrap |
| max_upload_size | |
| id | 1998153 |
| size | 115,365 |
Compact zero-copy wire format for microcontrollers using no allocator and supporting dynamic types.
StackVec for storing an object with arbitrary max-bound size on stack.This crate is a core piece of WireWeaver - lightweight microcontroller API code generator with support for methods (RPC), properties, streams, global traits and backward/forward compatibility.
[dependencies]
shrink_wrap = { version = "0.1.0", default-features = false }
To make this crate no_std.
[dependencies]
shrink_wrap = { version = "0.1.0", default-features = false }
[features]
default = ["std"]
std = ["shrink_wrap/std"]
And put #![cfg_attr(not(feature = "std"), no_std)] in lib.rs.
Then use your crate with default-features = false on no_std.
#[owned = "feature"] attribute to generate TyOwned from Ty<'i> and serdes code for it as well.BufWriter and BufReader that do low-level work with byte buffers, can be used stand-alone as well.Vec<T>) pick-up T’s kind and become it to save even more space.U1..U64 and I2..I64 bit-aligned types are provided as well.U1 which takes only one bit as enum discriminant!