← All projects
Project record1 mention
Originally shared on Hacker News

Nino

Nino is a source-generated binary serializer for C#, described by its submitter as the fastest available, designed to safely read untrusted bytes (checked lengths, bounded depth, limited hash flooding, fuzzed read paths), with identical output across CoreCLR/Mono/IL2CPP/32-bit hosts and runtime implementations for TypeScript, Go, and Rust that pass the same conformance corpus.

Last shared
01 / The problem

What it addresses

Safely deserializing bytes from untrusted input.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Nino

    Nino is a source-generated binary serializer for C#, described by its submitter as the fastest available, designed to safely read untrusted bytes (checked lengths, bounded depth, limited hash flooding, fuzzed read paths), with identical output across CoreCLR/Mono/IL2CPP/32-bit hosts and runtime implementations for TypeScript, Go, and Rust that pass the same conformance corpus.

    Problem: Safely deserializing bytes from untrusted input.

    Posted by @jnx11 · Original source ↗

    Story title · @jnx11 · · Source ↗

    Show HN: Nino – Fastest C# serializer, safe on untrusted input, also TS/Go/Rust

    Submitted URL · @jnx11 · · Source ↗

    https://github.com/JasonXuDeveloper/Nino

    Source text · @jnx11 · · Source ↗

    Nino is a source-generated binary serializer for C#, and as far as we know the fastest one.

    Source text · @jnx11 · · Source ↗

    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).

    Source text · @jnx11 · · Source ↗

    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.

    Source text · @jnx11 · · Source ↗

    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.

    Source text · @jnx11 · · Source ↗

    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+.

    Source text · @jnx11 · · Source ↗

    Reproduce: https://nino.xgamedev.net/en/docs/v4/benchmarks

    Source text · @jnx11 · · Source ↗

    Docs: https://nino.xgamedev.net