04
Neopack is live
2026-03-04 · 333 words
Slowly emerges from the sixth sea of silence.
Hello! I’m back for the time being.
I started working on a handful of projects, and those have been taking up my blogging time. Sorry for the inconsistency.
I wanted to announce that I’ve published the first (and hopefully only) version of Neopack! Neopack is a very small library for quick and schema-agnostic tag-length-value serialization. It should be good for both IDL and RPC type workloads. Here’s a minimal “getting-started”-type example:
[dependencies]
neopack = { version = "1.2", features = ["derive"] }
use neopack::{Pack, Unpack};
#[derive(Pack, Unpack)]
struct Point { x: i32, y: i32 }
let bytes = Point { x: 1, y: 2 }.pack_to_vec().unwrap();
let point = Point::unpack_from_bytes(&bytes).unwrap();
Neopack is what I’d consider to be “done” software. There might be a few minor wrinkles to iron out, but I don’t expect anything major about the library, its API, or the wire format to change anytime soon.
If you’d like to take a look, here are the docs. It is very similar to serde (except it’s only about one kiloline of code) and has zero-copy deserialization:
neopackon docs.rs. Core library, exposesderivefeature.neopack-deriveon docs.rs. Derive macros for thePackandUnpacktraits.
One limitation of neopack is that it’s no-std. So the crate doesn’t implement serialization for standard library types, like PathBuf. I considered going the serde route, with the fancy mod for custom serialize/deserialize, but in the name of simplicity I ask that you serialize these types yourself to bytes or a String, and to not include them in serialized structs. If I figure out a solution that makes everyone happy, I’ll do it!
That’s all! Thanks for reading.
Daily reading: Bob Nystrom, Representing Heterogeneous Data
I enjoyed Bob Nystrom’s musings on designing a language with heterogeneous data types, so you might enjoy it too.
(Neopack is built on heterogeneous Algebraic Data Types. Because neopack uses TLV for everything, you can fully and dynamically inspect and decode a packed value with an unknown schema! Isn’t that neat?)
Padded so you can keep scrolling. I know. I love you. How about we take you back up to the top of this page? All prose on this website is written by me, Isaac. I feel very strongly about preserving my voice, and will not use AI to publish prose under my name.