Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Nino – Fastest C# serializer, safe on untrusted input, also TS/Go/Rust (github.com/jasonxudeveloper)
1 point by jnx11 24 minutes ago | hide | past | favorite | discuss
Nino is a source-generated binary serializer for C#, and as far as we know the fastest one. In the same BenchmarkDotNet run on GitHub runners against MemoryPack 1.21.4, it serializes classes and polymorphic types 3.5–7.2x faster and deserializes them 1.7–2.1x faster (arrays of unmanaged structs are on par). Deserializing into existing objects allocates nothing. Reproduce: https://nino.xgamedev.net/en/docs/v4/benchmarks

It is built to read bytes you do not trust: lengths are checked before allocating, depth is bounded, hash flooding is limited, and the read paths are fuzzed in CI.

The bytes are a spec, not a memory dump, so CoreCLR, Mono, IL2CPP and 32-bit hosts write the same bytes, and runtimes for TypeScript, Go and Rust pass the same conformance corpus.

Trade-offs: positional by default (VersionTolerant or Keyed for stored data), a 4-byte type id on polymorphic values, no System.Type, needs C# 9 and Roslyn 4.3+.

Docs: https://nino.xgamedev.net

 help





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: