Skip to content
zhou.
N-Lib

[Releave v0.5.1] Updates on wire fomat

zhouzhouzhouzhouN-Lib10 Sept 2026

v0.5.1 — 2026-09-09

single_queue's cache-line size becomes a macro a consumer can override.

  • NLIB_CACHE_LINE replaces the std::hardware_destructive_interference_size check. common.h defines it to 64 unless a consumer defines it first; single_queue's two atomic counters align to it instead of a feature-tested constant computed on its own. A consumer that logs or tunes the alignment now has one macro to read instead of duplicating the feature-test.

v0.5.0 — 2026-09-06

cancel becomes a record of its own, and book defaults to a top-of-book snapshot. Every wire type's layout moves again, so rebuild consumers together.

  • cancel carries order_id and qty directly, instead of riding order's cancel_qty field. order drops that field and shrinks from 88 to 80 bytes; cancel is a new 48-byte record framed by cancel_tag (3). feed_event and record both add it.
  • order_action keeps only add and modify. cancel and clear leave the enum; a full cancel is a cancel record whose qty is the whole remainder.
  • book's depth constant is renamed snapshot_depth and defaults to 1. book shrinks from 344 to 56 bytes, a top-of-book snapshot rather than a ten-level one. A consumer needing more depth raises the constant and rebuilds.
  • The header stops asserting each record's exact byte size. The is_trivially_copyable and is_standard_layout checks stay; the sizeof checks are gone, so a layout change no longer fails the build on its own.

Comments

Sign in to join the discussion.

No comments yet. Be the first.