nibblecode 0.1.0

A serialization format based on rkyv
Documentation
  • Coverage
  • 75.18%
    106 out of 141 items documented7 out of 71 items with examples
  • Size
  • Source code size: 107.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 7.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 27s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • bolshoytoster/nibblecode
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bolshoytoster

Nibblecode is a zero-copy serialization format heavily inspired[^1] by rkyv. In many cases, this is faster than rkyv, and has better ergonomics, but it sacrifices some features that you may want:

  • No stream serialization (data can only be serialized into a preallocated buffer)
  • No support for rust stable (this uses several nightly-only features, some for convenience (like ptr_alignment_type), some for core functionality (like allocator_api))
  • I haven't gotten round to implementing all data structures (although they'd only take a few hours to implement)
  • No full deserialization (the API is exclusively zero-copy, you'll have to handle conversion yourself, if needed)

Disclaimer

I made this in a week, mostly as a learning experiment, and also to see if I could beat rkyv in their own benchmarks.

This has good performance in the niche of serializing small messages, where storage size/bandwidth isn't a concern. In all other cases, I recommend bitcode, which produces tiny messages, and is also much faster than this for large messages.

Also, the documentation is very incomplete.

[^1]: I don't think I can call it a fork (it's more of a ground-up remake), since I have changed quite a lot about the core design, but the structure of the codebase is practically copied. I have kept the same license, just in case that matters.