<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Omnibuf on kmcd.dev</title><link>https://kmcd.dev/tags/omnibuf/</link><description>Recent content in Omnibuf on kmcd.dev</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>All Rights Reserved</copyright><lastBuildDate>Tue, 24 Nov 2026 10:00:00 +0000</lastBuildDate><atom:link href="https://kmcd.dev/tags/omnibuf/index.xml" rel="self" type="application/rss+xml"/><item><title>OmniBuf</title><link>https://kmcd.dev/posts/omnibuf/</link><pubDate>Tue, 24 Nov 2026 10:00:00 +0000</pubDate><guid>https://kmcd.dev/posts/omnibuf/</guid><description><![CDATA[ 
                <p> <img hspace="5" src="https://kmcd.dev/posts/omnibuf/cover.svg" /> </p>
                
                What happens if you keep .proto schemas and replace Protobuf&#39;s binary wire format underneath?
                ]]></description><content:encoded><![CDATA[<p>After my <a href="https://kmcd.dev/series/grpc-from-scratch/">gRPC From Scratch</a> series, I realized how simple the Protobuf binary encoding actually is. My <a href="https://kmcd.dev/posts/protobuf-varint-vs-fixed/">benchmarks comparing varints and fixed-size integers in Go</a> got me experimenting with the binary encoding. I wanted to see what Protobuf would look like with different tradeoffs, more modern encoding techniques, and the ability to blind-decode message values. What if we kept <code>.proto</code> files and services, but swapped out the binary wire format underneath? That experiment turned into an encoding that I call <strong><a href="https://omnibuf.com" rel="external">OmniBuf</a></strong>.</p>
<p>Protobuf&rsquo;s schema language and wire format are separate. A <code>.proto</code> file defines messages and services, while an encoding determines how message values are stored or sent. Protobuf already supports other encodings, including ProtoJSON and Text Format.</p>
<p>OmniBuf is a self-describing binary wire format built to work with <code>.proto</code> schemas, gRPC, and Connect, as well as plain native types in code. You can keep your <code>.proto</code> schemas and service definitions, though using OmniBuf for RPCs requires registering an OmniBuf codec on both the client and server. It keeps what makes Protobuf good for schema evolution, while changing the wire encoding to make a few different tradeoffs:</p>
<ul>
<li><strong>Faster on modern CPUs:</strong> Replaces byte-by-byte LEB128 varints with <a href="https://omnibuf.com/how-it-works#prefix-varints" rel="external">prefix-varints</a> whose encoded length can be determined from the first byte, encodes nested messages in a <a href="https://omnibuf.com/how-it-works#single-pass" rel="external">single forward pass</a>, and encodes arrays and <a href="https://omnibuf.com/how-it-works#native-maps" rel="external">maps natively</a> as length-prefixed containers.</li>
<li><strong>Blind-decodable without a schema:</strong> Expands the wire format to <a href="https://omnibuf.com/how-it-works#wire-types" rel="external">16 explicit types</a> (plus optional <a href="https://omnibuf.com/how-it-works#field-0-names" rel="external">Field #0 field names</a>), so a CLI, proxy, or debugger can inspect a raw <code>.obuf</code> payload and distinguish strings, bytes, numbers, booleans, arrays, maps, and nested messages without the original Protobuf schema or guessing like protoscope does.</li>
<li><strong>Cheap partial reads and edits:</strong> If you just want to read and write a field or two, you can <a href="https://omnibuf.com/how-it-works#skip-fields" rel="external">skip full message decoding</a> to read a single field and splice an updated value back in much faster than decoding the full message.</li>
<li><strong>Smoother on-ramp:</strong> Annotated structs with matching field numbers and types use the same OmniBuf wire format as generated code, so you can start with native types and move to <code>.proto</code> files later (or not!).</li>
</ul>
<div class="diagram-wrapper">
    <span class="diagram"
        style="">
<figure><a href="https://kmcd.dev/posts/omnibuf/overview.svg" class="spotlight" data-download="true" aria-label="Diagram showing peer.proto branching to Protobuf, JSON, and OmniBuf encodings alongside native language files pointing directly to OmniBuf">
    
    
    
    
        
            
            
                
            
        
    

    
    
    
    

    
    
        
    

    <img src="https://kmcd.dev/posts/omnibuf/overview.svg"
         class="img-fade-in"
         onload="this.classList.add('is-loaded')"
         alt="Diagram showing peer.proto branching to Protobuf, JSON, and OmniBuf encodings alongside native language files pointing directly to OmniBuf" loading="lazy"/>
    </a><figcaption>
            <p>OmniBuf works both as an alternate encoding for <code>.proto</code> schemas and directly on native types across 12 languages.</p>
        </figcaption>
</figure>


    </span>

    
</div>

<h2 id="partial-reads-and-splicing">Partial Reads and Splicing</h2>
<p>Protobuf already lets you skip length-delimited fields like strings, bytes, and nested messages once you read their length. Integer varints take more work because you have to scan continuation bits one byte at a time to find where each number ends, and maps or non-packed repeated fields are split across separate tagged entries. OmniBuf puts an integer&rsquo;s encoded width in its first byte and wraps whole arrays and maps as length-prefixed containers, so the reader hops directly from <a href="https://omnibuf.com/how-it-works#skip-fields" rel="external">field to field</a>:</p>
<div class="diagram-wrapper">
    <span class="diagram"
        style="">

    
    
        
        
        
        
        
        
        
        
        <div class="svg-diagram-inline center"
                 style="display: block; max-width: 100%; margin-left: auto; margin-right: auto;">
                <svg class="ob-skip-diagram" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 860 390" role="img" aria-label="Comparison of Protobuf byte-by-byte varint bouncing versus OmniBuf header hopping" font-family="var(--font-mono), ui-monospace, SFMono-Regular, Menlo, Consolas, monospace">
  <style>
    .ob-skip-diagram {
      --ob-ink: #f0f6ff;
      --ob-stroke: #475c8a;
      --ob-proto: #ff6b4a;
      --ob-accent: #2dd4bf;
      --ob-tag-bg: #1e2c4a;
      --ob-tag-fg: #f0f6ff;
      --ob-val-bg: #162036;
      --ob-val-fg: #d9e4f5;
      --ob-skip-bg: #111829;
      --ob-skip-fg: #7f93b8;
      --ob-muted: #98add1;
      --ob-dot-bg: #141c2e;
      --ob-target-fg: #0d121f;
      --ob-divider: rgba(240, 246, 255, 0.16);
    }
    @media (prefers-color-scheme: light) {
      :root:not([data-theme="dark"]) .ob-skip-diagram {
        --ob-ink: #111111;
        --ob-stroke: #111111;
        --ob-proto: #ff4f18;
        --ob-accent: #d4ff33;
        --ob-tag-bg: #111111;
        --ob-tag-fg: #faf8f2;
        --ob-val-bg: #e5e0d5;
        --ob-val-fg: #111111;
        --ob-skip-bg: #efece4;
        --ob-skip-fg: #666666;
        --ob-muted: #555555;
        --ob-dot-bg: #faf8f2;
        --ob-target-fg: #111111;
        --ob-divider: rgba(17, 17, 17, 0.15);
      }
    }
    [data-theme="light"] .ob-skip-diagram {
      --ob-ink: #111111;
      --ob-stroke: #111111;
      --ob-proto: #ff4f18;
      --ob-accent: #d4ff33;
      --ob-tag-bg: #111111;
      --ob-tag-fg: #faf8f2;
      --ob-val-bg: #e5e0d5;
      --ob-val-fg: #111111;
      --ob-skip-bg: #efece4;
      --ob-skip-fg: #666666;
      --ob-muted: #555555;
      --ob-dot-bg: #faf8f2;
      --ob-target-fg: #111111;
      --ob-divider: rgba(17, 17, 17, 0.15);
    }
  </style>
  <defs>
    <marker id="hop-proto" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="5.5" markerHeight="5.5" orient="auto">
      <path d="M 0 1 L 10 5 L 0 9 z" fill="var(--ob-proto)"/>
    </marker>
    <marker id="hop-omni" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">
      <path d="M 0 1 L 10 5 L 0 9 z" fill="var(--ob-ink)"/>
    </marker>
  </defs>

  <!-- TRACK 1: PROTOBUF (8 Byte-by-Byte Bounces) -->
  <text x="20" y="26" fill="var(--ob-proto)" font-size="13.5" font-weight="700">PROTOBUF: Bounces on every varint byte to check continuation bits (8 stops)</text>

  <path d="M 62 91 Q 98 52 131 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 148 91 Q 184 52 217 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 234 91 Q 270 52 303 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 320 91 Q 356 52 389 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 406 91 Q 442 52 475 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 492 91 Q 528 52 561 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 578 91 Q 614 52 647 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>
  <path d="M 664 91 Q 700 52 733 89" fill="none" stroke="var(--ob-proto)" stroke-width="2.5" marker-end="url(#hop-proto)"/>

  <circle cx="55" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="141" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="227" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="313" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="399" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="485" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="571" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="657" cy="95" r="4" fill="var(--ob-dot-bg)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="743" cy="95" r="4" fill="var(--ob-accent)" stroke="var(--ob-ink)" stroke-width="2"/>

  <rect x="16" y="102" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="55" y="125" fill="var(--ob-tag-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Tag B1</text>
  <text x="55" y="143" fill="var(--ob-proto)" font-size="10.5" font-weight="600" text-anchor="middle">more? 1</text>

  <rect x="102" y="102" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="141" y="125" fill="var(--ob-tag-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Tag B2</text>
  <text x="141" y="143" fill="var(--ob-accent)" font-size="10.5" font-weight="600" text-anchor="middle">end: 0</text>

  <rect x="188" y="102" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="227" y="125" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Int B1</text>
  <text x="227" y="143" fill="var(--ob-proto)" font-size="10.5" font-weight="700" text-anchor="middle">more? 1</text>

  <rect x="274" y="102" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="313" y="125" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Int B2</text>
  <text x="313" y="143" fill="var(--ob-proto)" font-size="10.5" font-weight="700" text-anchor="middle">more? 1</text>

  <rect x="360" y="102" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="399" y="125" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Int B3</text>
  <text x="399" y="143" fill="var(--ob-proto)" font-size="10.5" font-weight="700" text-anchor="middle">more? 1</text>

  <rect x="446" y="102" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="485" y="125" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Int B4</text>
  <text x="485" y="143" fill="var(--ob-val-fg)" font-size="10.5" font-weight="600" text-anchor="middle">end: 0</text>

  <rect x="532" y="102" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="571" y="125" fill="var(--ob-tag-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Tag</text>
  <text x="571" y="143" fill="var(--ob-tag-fg)" font-size="10.5" text-anchor="middle">bool</text>

  <rect x="618" y="102" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="657" y="125" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Bool</text>
  <text x="657" y="143" fill="var(--ob-val-fg)" font-size="10.5" text-anchor="middle">1 byte</text>

  <rect x="704" y="102" width="140" height="52" rx="5" fill="var(--ob-accent)" stroke="var(--ob-stroke)" stroke-width="2.5"/>
  <text x="774" y="125" fill="var(--ob-target-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Target: city</text>
  <text x="774" y="143" fill="var(--ob-target-fg)" font-size="10.5" font-weight="600" text-anchor="middle">8 stops</text>

  <text x="98" y="174" fill="var(--ob-muted)" font-size="11.5" font-weight="600" text-anchor="middle">2-Byte Varint Tag</text>
  <text x="356" y="174" fill="var(--ob-muted)" font-size="11.5" font-weight="600" text-anchor="middle">4-Byte Varint Integer</text>
  <text x="614" y="174" fill="var(--ob-muted)" font-size="11.5" font-weight="600" text-anchor="middle">2-Byte Bool</text>

  <line x1="16" y1="200" x2="844" y2="200" stroke="var(--ob-divider)" stroke-width="2" stroke-dasharray="6 6"/>

  <!-- TRACK 2: OMNIBUF (3 Direct Header Jumps) -->
  <text x="20" y="234" fill="var(--ob-ink)" font-size="13.5" font-weight="700">OMNIBUF: Leaps whole tags &amp; values in one jump (3 stops)</text>

  <path d="M 63 298 Q 141 245 216 296" fill="none" stroke="var(--ob-ink)" stroke-width="3" marker-end="url(#hop-omni)"/>
  <rect x="88" y="248" width="104" height="20" rx="4" fill="var(--ob-accent)" stroke="var(--ob-stroke)" stroke-width="1.5"/>
  <text x="140" y="262" fill="var(--ob-target-fg)" font-size="10.5" font-weight="700" text-anchor="middle">Jump +2B Tag</text>

  <path d="M 236 298 Q 399 235 559 296" fill="none" stroke="var(--ob-ink)" stroke-width="3" marker-end="url(#hop-omni)"/>
  <rect x="338" y="244" width="122" height="20" rx="4" fill="var(--ob-accent)" stroke="var(--ob-stroke)" stroke-width="1.5"/>
  <text x="399" y="258" fill="var(--ob-target-fg)" font-size="10.5" font-weight="700" text-anchor="middle">Skip +4B Value</text>

  <path d="M 579 298 Q 614 256 646 296" fill="none" stroke="var(--ob-ink)" stroke-width="3" marker-end="url(#hop-omni)"/>
  <rect x="570" y="250" width="86" height="20" rx="4" fill="var(--ob-accent)" stroke="var(--ob-stroke)" stroke-width="1.5"/>
  <text x="613" y="264" fill="var(--ob-target-fg)" font-size="10.5" font-weight="700" text-anchor="middle">Jump +1B</text>

  <circle cx="55" cy="303" r="4.5" fill="var(--ob-accent)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="227" cy="303" r="4.5" fill="var(--ob-accent)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="571" cy="303" r="4.5" fill="var(--ob-accent)" stroke="var(--ob-ink)" stroke-width="2"/>
  <circle cx="657" cy="303" r="4.5" fill="var(--ob-accent)" stroke="var(--ob-ink)" stroke-width="2"/>

  <rect x="16" y="310" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="55" y="333" fill="var(--ob-tag-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Tag B1</text>
  <text x="55" y="351" fill="var(--ob-accent)" font-size="10.5" font-weight="700" text-anchor="middle">len = 2B</text>

  <rect x="102" y="310" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" fill-opacity="0.55" stroke="var(--ob-stroke)" stroke-width="1.5" stroke-dasharray="4 3"/>
  <text x="141" y="333" fill="var(--ob-tag-fg)" font-size="12.5" font-weight="600" text-anchor="middle">Tag B2</text>
  <text x="141" y="351" fill="var(--ob-tag-fg)" font-size="10" text-anchor="middle">1 load</text>

  <rect x="188" y="310" width="78" height="52" rx="5" fill="var(--ob-val-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="227" y="333" fill="var(--ob-val-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Int B1</text>
  <text x="227" y="351" fill="var(--ob-val-fg)" font-size="10.5" font-weight="700" text-anchor="middle">len = 4B</text>

  <rect x="274" y="310" width="78" height="52" rx="5" fill="var(--ob-skip-bg)" stroke="var(--ob-stroke)" stroke-opacity="0.45" stroke-width="1.5" stroke-dasharray="4 3"/>
  <text x="313" y="333" fill="var(--ob-skip-fg)" font-size="12.5" text-anchor="middle">Int B2</text>
  <text x="313" y="351" fill="var(--ob-skip-fg)" font-size="10" text-anchor="middle">skipped</text>

  <rect x="360" y="310" width="78" height="52" rx="5" fill="var(--ob-skip-bg)" stroke="var(--ob-stroke)" stroke-opacity="0.45" stroke-width="1.5" stroke-dasharray="4 3"/>
  <text x="399" y="333" fill="var(--ob-skip-fg)" font-size="12.5" text-anchor="middle">Int B3</text>
  <text x="399" y="351" fill="var(--ob-skip-fg)" font-size="10" text-anchor="middle">skipped</text>

  <rect x="446" y="310" width="78" height="52" rx="5" fill="var(--ob-skip-bg)" stroke="var(--ob-stroke)" stroke-opacity="0.45" stroke-width="1.5" stroke-dasharray="4 3"/>
  <text x="485" y="333" fill="var(--ob-skip-fg)" font-size="12.5" text-anchor="middle">Int B4</text>
  <text x="485" y="351" fill="var(--ob-skip-fg)" font-size="10" text-anchor="middle">skipped</text>

  <rect x="532" y="310" width="78" height="52" rx="5" fill="var(--ob-tag-bg)" stroke="var(--ob-stroke)" stroke-width="2"/>
  <text x="571" y="333" fill="var(--ob-tag-fg)" font-size="12" font-weight="700" text-anchor="middle">Tag=True</text>
  <text x="571" y="351" fill="var(--ob-accent)" font-size="10" font-weight="700" text-anchor="middle">0 val bytes</text>

  <rect x="618" y="310" width="140" height="52" rx="5" fill="var(--ob-accent)" stroke="var(--ob-stroke)" stroke-width="2.5"/>
  <text x="688" y="333" fill="var(--ob-target-fg)" font-size="12.5" font-weight="700" text-anchor="middle">Target: city</text>
  <text x="688" y="351" fill="var(--ob-target-fg)" font-size="10.5" font-weight="600" text-anchor="middle">3 jumps</text>
</svg>

            </div>
        
    



    </span>

    
        <figcaption>Skipping varint tags and values on the wire: Protobuf checks continuation bits byte by byte, while OmniBuf reads the width from the first byte and jumps straight ahead.</figcaption>
    
</div>

<p>We can also use these length-delimited fields to splice in an edited value without parsing and re-encoding the rest of the message. There is a full walkthrough of how this works <a href="https://omnibuf.com/#read-or-splice" rel="external">on the website</a>:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="kd">var</span><span class="w"> </span><span class="nx">view</span><span class="w"> </span><span class="nx">pb</span><span class="p">.</span><span class="nx">OpaquePeerUpdate</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">_</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">view</span><span class="p">.</span><span class="nf">Unmarshal</span><span class="p">(</span><span class="nx">pkt</span><span class="p">)</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">router</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">view</span><span class="p">.</span><span class="nf">GetRouterId</span><span class="p">()</span><span class="w"> </span><span class="c1">// skips earlier fields by byte length</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">view</span><span class="p">.</span><span class="nf">SetActive</span><span class="p">(</span><span class="kc">false</span><span class="p">)</span><span class="w">        </span><span class="c1">// marks field #3 dirty</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">pkt</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="nx">view</span><span class="p">.</span><span class="nf">MarshalAppend</span><span class="p">(</span><span class="kc">nil</span><span class="p">)</span><span class="w">
</span></span></span></code></pre></div><h2 id="plain-structs">Plain Structs</h2>
<p>I want to address an elephant in the room when talking about Protobuf. It&rsquo;s weird. You&rsquo;re defining types in a specialized language and need tooling to generate types in the language that you actually want to use. I can understand how that will turn people off from the format altogether. I wanted a way to use the format without the song and dance of Protobuf code generation.</p>
<p>With OmniBuf, you can use language features like <a href="https://omnibuf.com/go#struct-tags" rel="external">Go struct tags</a> (<code>omnibuf:&quot;1&quot;</code>), Rust derive macros, and <a href="https://omnibuf.com/es#define-message" rel="external">TypeScript defineMessage</a> definitions to emit the exact same messages as <code>.proto</code> generated code. The idea is that you can start with types that are native to your language of choice and then move to <code>.proto</code> files later with no change to the data on the wire:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="line"><span class="cl"><span class="c1">// From .proto</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">protoPkt</span><span class="p">,</span><span class="w"> </span><span class="nx">_</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">omnibuf</span><span class="p">.</span><span class="nf">Marshal</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">pb</span><span class="p">.</span><span class="nx">Node</span><span class="p">{</span><span class="nx">Id</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nx">City</span><span class="p">:</span><span class="w"> </span><span class="s">&#34;FRA&#34;</span><span class="p">})</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="c1">// From a plain Go struct</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="kd">type</span><span class="w"> </span><span class="nx">Node</span><span class="w"> </span><span class="kd">struct</span><span class="w"> </span><span class="p">{</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nx">ID</span><span class="w">   </span><span class="kt">uint32</span><span class="w"> </span><span class="s">`omnibuf:&#34;1&#34;`</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nx">City</span><span class="w"> </span><span class="kt">string</span><span class="w"> </span><span class="s">`omnibuf:&#34;2&#34;`</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="p">}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nx">structPkt</span><span class="p">,</span><span class="w"> </span><span class="nx">_</span><span class="w"> </span><span class="o">:=</span><span class="w"> </span><span class="nx">omnibuf</span><span class="p">.</span><span class="nf">Marshal</span><span class="p">(</span><span class="o">&amp;</span><span class="nx">Node</span><span class="p">{</span><span class="nx">ID</span><span class="p">:</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nx">City</span><span class="p">:</span><span class="w"> </span><span class="s">&#34;FRA&#34;</span><span class="p">})</span><span class="w">
</span></span></span></code></pre></div><p>This gives you an on-ramp to OmniBuf without having to buy into the schema-first design philosophy. I think schema-first design is worth it, but I don&rsquo;t want that to get in the way of using a more efficient message format.</p>
<h2 id="benchmarks-and-tradeoffs">Benchmarks and Tradeoffs</h2>
<p>Okay, so how fast is OmniBuf, really? I expected these changes to help. I didn&rsquo;t expect gains this large.</p>
<p>These charts compare OmniBuf&rsquo;s generated codecs with Protobuf implementations in 11 languages, using an 11-field <code>PeerUpdate</code> message on an Apple M1 Pro. The Protobuf baselines include <code>google.golang.org/protobuf</code> in Go, <code>prost</code> in Rust, and <code>protobuf-java</code> in Java. Full methodology, library versions, and non-codegen struct benchmarks are on the <a href="https://omnibuf.com/benchmarks" rel="external">benchmark page</a>.</p>
<div class="rss-tabs-container">
  
  <div class="rss-tab-section" style="margin-top: 20px; border-top: 1px solid #eee; padding-top: 10px;">
  <h3>Full Decode (vs Protobuf)</h3>
  <div class="chart-wrapper">
<div class="chart">
<canvas id="dab7c4f8e5654a28" data-unit="x" data-sort="desc"></canvas>
</div>
</div>
<script>
(function() {
window.chartJsPromise = window.chartJsPromise || new Promise((resolve, reject) => {
if (window.Chart) {
resolve(window.Chart);
return;
}
const script = document.createElement('script');
script.src = "https://cdn.jsdelivr.net/npm/chart.js";
script.async = true;
script.onload = () => resolve(window.Chart);
script.onerror = () => reject(new Error("Failed to load Chart.js"));
document.head.appendChild(script);
});
window.activeCharts = window.activeCharts || [];
function getThemeColors() {
const isLight = document.documentElement.getAttribute('data-theme') === 'light';
if (isLight) {
return {
text: '#141a2e',
grid: 'rgba(20, 26, 46, 0.12)'
};
}
return {
text: '#f0f6ff',
grid: 'rgba(255, 255, 255, 0.12)'
};
}
function applyThemeToOptions(options, colors) {
if (!options) return;
if (!options.plugins) options.plugins = {};
if (options.plugins.title) {
options.plugins.title.color = colors.text;
}
if (!options.plugins.legend) options.plugins.legend = {};
if (!options.plugins.legend.labels) options.plugins.legend.labels = {};
options.plugins.legend.labels.color = colors.text;
if (!options.scales) options.scales = {};
if (!options.scales.x) options.scales.x = {};
if (!options.scales.y) options.scales.y = {};
for (const scaleId in options.scales) {
const scale = options.scales[scaleId];
if (scale && typeof scale === 'object') {
if (!scale.ticks) scale.ticks = {};
scale.ticks.color = colors.text;
if (scale.title) {
scale.title.color = colors.text;
}
if (!scale.grid) scale.grid = {};
scale.grid.color = colors.grid;
}
}
}
if (!window.chartThemeObserver) {
window.chartThemeObserver = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.attributeName === 'data-theme') {
const colors = getThemeColors();
window.activeCharts.forEach((chart) => {
applyThemeToOptions(chart.options, colors);
chart.update();
});
}
});
});
window.chartThemeObserver.observe(document.documentElement, { attributes: true });
}
window.chartJsPromise.then((Chart) => {
const ctx = document.getElementById('dab7c4f8e5654a28');
if (!ctx) return;
const chartConfig = 
{
  "type": "bar",
  "data": {
    "labels": [
      "Go",
      "Dart",
      "PHP",
      "TypeScript / JS",
      "Elixir",
      "C++",
      "C# / .NET",
      "Swift",
      "Rust",
      "Java",
      "Python"
    ],
    "datasets": [
      {
        "label": "Speedup vs Protobuf (higher is better)",
        "data": [5.2, 4.8, 3.7, 2.9, 2.9, 2.6, 2.3, 2.3, 2.0, 2.0, 1.8],
        "backgroundColor": "rgba(0, 168, 150, 0.88)",
        "borderWidth": 0
      }
    ]
  },
  "options": {
    "indexAxis": "y",
    "plugins": {
      "title": {
        "display": true,
        "text": "Full Decode Speedup vs Protobuf (PeerUpdate, higher is better)"
      },
      "legend": {
        "display": false
      }
    },
    "scales": {
      "x": {
        "type": "linear",
        "min": 0,
        "title": {
          "display": true,
          "text": "Speedup (x faster than Protobuf)"
        }
      }
    }
  }
};
const isMobileWidth = window.innerWidth >= 600 ? false : true;
if (!chartConfig.options) chartConfig.options = {};
if (chartConfig.options.responsive === undefined) chartConfig.options.responsive = true;
if (chartConfig.options.maintainAspectRatio === undefined) chartConfig.options.maintainAspectRatio = false;
if (isMobileWidth && chartConfig.data && chartConfig.data.labels) {
chartConfig.data.labels = chartConfig.data.labels.map(function(label) {
if (typeof label === 'string') {
return label
.replace('google.protobuf.Value', 'g.p.Value')
.replace('google.protobuf.Any', 'g.p.Any')
.replace('google.protobuf.', 'g.p.');
}
return label;
});
}
if (isMobileWidth) {
if (!chartConfig.options.scales) chartConfig.options.scales = {};
if (!chartConfig.options.scales.x) chartConfig.options.scales.x = {};
if (!chartConfig.options.scales.x.ticks) chartConfig.options.scales.x.ticks = {};
if (!chartConfig.options.scales.x.ticks.font) chartConfig.options.scales.x.ticks.font = {};
chartConfig.options.scales.x.ticks.font.size = 10;
if (!chartConfig.options.scales.y) chartConfig.options.scales.y = {};
if (!chartConfig.options.scales.y.ticks) chartConfig.options.scales.y.ticks = {};
if (!chartConfig.options.scales.y.ticks.font) chartConfig.options.scales.y.ticks.font = {};
chartConfig.options.scales.y.ticks.font.size = 10;
}
function adjustHeight() {
const isMobile = window.innerWidth >= 600 ? false : true;
const barCount = (chartConfig.data && chartConfig.data.labels) ? chartConfig.data.labels.length : 0;
let chartHeight = 350;
if (chartConfig.type === 'bar' && chartConfig.options.indexAxis === 'y') {
const heightPerBar = isMobile ? 35 : 30;
const extraPadding = isMobile ? 130 : 100;
chartHeight = Math.max(300, (barCount * heightPerBar) + extraPadding);
} else {
chartHeight = isMobile ? 320 : 380;
}
ctx.parentElement.style.height = chartHeight + 'px';
}
adjustHeight();
window.addEventListener('resize', adjustHeight);
if (chartConfig.options && chartConfig.options.plugins && chartConfig.options.plugins.legend && chartConfig.options.plugins.legend.customLegend) { const customItems = chartConfig.options.plugins.legend.customLegend; chartConfig.options.plugins.legend.labels = chartConfig.options.plugins.legend.labels || {}; chartConfig.options.plugins.legend.labels.generateLabels = function(chart) { const c = getThemeColors().text; return customItems.map(function(item) { return { text: item.text, fillStyle: item.color, strokeStyle: item.color, lineWidth: 1, hidden: false, fontColor: c, color: c }; }); }; chartConfig.options.plugins.legend.onClick = function() {}; }
const colors = getThemeColors();
applyThemeToOptions(chartConfig.options, colors);
const customLabelPlugin = {
id: 'customLabelPlugin',
afterDatasetsDraw: function(chart) {
if (chart.config.type !== 'bar') return;
const ctx = chart.ctx;
const canvasEl = chart.canvas;
const unit = canvasEl.getAttribute('data-unit');
const labelColor = getThemeColors().text;
chart.data.datasets.forEach(function(dataset, datasetIndex) {
const meta = chart.getDatasetMeta(datasetIndex);
meta.data.forEach(function(bar, index) {
const value = dataset.data[index];
if (value === undefined || value === null) return;
if (bar && typeof bar.x === 'number' && chart.isDatasetVisible(datasetIndex)) {
ctx.fillStyle = labelColor;
ctx.textAlign = 'left';
ctx.textBaseline = 'middle';
const isMobile = window.innerWidth >= 600 ? false : true;
ctx.font = isMobile ? 'bold 10px sans-serif' : 'bold 11px sans-serif';
let text = value.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 });
if (unit) {
text += ' ' + unit;
} else {
const label = dataset.label || '';
if (label.toLowerCase().indexOf('bytes') !== -1) {
text += ' B';
} else if (label.toLowerCase().indexOf('ns') !== -1) {
text += ' ns';
}
}
ctx.fillText(text, bar.x + 6, bar.y);
}
});
});
}
};
chartConfig.plugins = chartConfig.plugins || [];
chartConfig.plugins.push(customLabelPlugin);
if (!chartConfig.options.scales) chartConfig.options.scales = {};
if (!chartConfig.options.scales.x) chartConfig.options.scales.x = {};
chartConfig.options.scales.x.grace = isMobileWidth ? '25%' : '15%';
const canvasEl = ctx;
const sortAttr = canvasEl.getAttribute('data-sort');
if (sortAttr !== 'false' && chartConfig.type === 'bar' && chartConfig.data && chartConfig.data.datasets && chartConfig.data.datasets[0]) {
const dataset = chartConfig.data.datasets[0];
const label = (dataset.label || '').toLowerCase();
let sortOrder = 'asc';
if (label.indexOf('rps') !== -1 || label.indexOf('throughput') !== -1 || sortAttr === 'desc') {
sortOrder = 'desc';
}
if (chartConfig.data.labels && dataset.data && chartConfig.data.labels.length === dataset.data.length) {
let items = chartConfig.data.labels.map(function(label, index) {
return {
label: label,
value: dataset.data[index],
backgroundColor: Array.isArray(dataset.backgroundColor) ? dataset.backgroundColor[index] : dataset.backgroundColor,
borderColor: Array.isArray(dataset.borderColor) ? dataset.borderColor[index] : dataset.borderColor
};
});
items.sort(function(a, b) {
if (sortOrder === 'desc') {
return b.value - a.value;
}
return a.value - b.value;
});
chartConfig.data.labels = items.map(function(item) { return item.label; });
dataset.data = items.map(function(item) { return item.value; });
if (Array.isArray(dataset.backgroundColor)) {
dataset.backgroundColor = items.map(function(item) { return item.backgroundColor; });
}
if (Array.isArray(dataset.borderColor)) {
dataset.borderColor = items.map(function(item) { return item.borderColor; });
}
}
}
const chart = new Chart(ctx, chartConfig);
window.activeCharts.push(chart);
if (window.onChartInit) {
window.onChartInit(chart);
}
}, (err) => {
console.error("Chart.js loading error: ", err);
});
})();
</script>

</div>

  <div class="rss-tab-section" style="margin-top: 20px; border-top: 1px solid #eee; padding-top: 10px;">
  <h3>Full Encode (vs Protobuf)</h3>
  <div class="chart-wrapper">
<div class="chart">
<canvas id="8105966c7cbc744f" data-unit="x" data-sort="desc"></canvas>
</div>
</div>
<script>
(function() {
window.chartJsPromise = window.chartJsPromise || new Promise((resolve, reject) => {
if (window.Chart) {
resolve(window.Chart);
return;
}
const script = document.createElement('script');
script.src = "https://cdn.jsdelivr.net/npm/chart.js";
script.async = true;
script.onload = () => resolve(window.Chart);
script.onerror = () => reject(new Error("Failed to load Chart.js"));
document.head.appendChild(script);
});
window.activeCharts = window.activeCharts || [];
function getThemeColors() {
const isLight = document.documentElement.getAttribute('data-theme') === 'light';
if (isLight) {
return {
text: '#141a2e',
grid: 'rgba(20, 26, 46, 0.12)'
};
}
return {
text: '#f0f6ff',
grid: 'rgba(255, 255, 255, 0.12)'
};
}
function applyThemeToOptions(options, colors) {
if (!options) return;
if (!options.plugins) options.plugins = {};
if (options.plugins.title) {
options.plugins.title.color = colors.text;
}
if (!options.plugins.legend) options.plugins.legend = {};
if (!options.plugins.legend.labels) options.plugins.legend.labels = {};
options.plugins.legend.labels.color = colors.text;
if (!options.scales) options.scales = {};
if (!options.scales.x) options.scales.x = {};
if (!options.scales.y) options.scales.y = {};
for (const scaleId in options.scales) {
const scale = options.scales[scaleId];
if (scale && typeof scale === 'object') {
if (!scale.ticks) scale.ticks = {};
scale.ticks.color = colors.text;
if (scale.title) {
scale.title.color = colors.text;
}
if (!scale.grid) scale.grid = {};
scale.grid.color = colors.grid;
}
}
}
if (!window.chartThemeObserver) {
window.chartThemeObserver = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.attributeName === 'data-theme') {
const colors = getThemeColors();
window.activeCharts.forEach((chart) => {
applyThemeToOptions(chart.options, colors);
chart.update();
});
}
});
});
window.chartThemeObserver.observe(document.documentElement, { attributes: true });
}
window.chartJsPromise.then((Chart) => {
const ctx = document.getElementById('8105966c7cbc744f');
if (!ctx) return;
const chartConfig = 
{
  "type": "bar",
  "data": {
    "labels": [
      "Elixir",
      "Go",
      "Dart",
      "Swift",
      "C# / .NET",
      "Rust",
      "TypeScript / JS",
      "C++",
      "PHP",
      "Java",
      "Python"
    ],
    "datasets": [
      {
        "label": "Speedup vs Protobuf (higher is better)",
        "data": [7.4, 5.4, 3.9, 3.8, 1.8, 1.6, 1.5, 1.4, 1.4, 1.2, 1.2],
        "backgroundColor": "rgba(255, 84, 73, 0.88)",
        "borderWidth": 0
      }
    ]
  },
  "options": {
    "indexAxis": "y",
    "plugins": {
      "title": {
        "display": true,
        "text": "Full Encode Speedup vs Protobuf (PeerUpdate, higher is better)"
      },
      "legend": {
        "display": false
      }
    },
    "scales": {
      "x": {
        "type": "linear",
        "min": 0,
        "title": {
          "display": true,
          "text": "Speedup (x faster than Protobuf)"
        }
      }
    }
  }
};
const isMobileWidth = window.innerWidth >= 600 ? false : true;
if (!chartConfig.options) chartConfig.options = {};
if (chartConfig.options.responsive === undefined) chartConfig.options.responsive = true;
if (chartConfig.options.maintainAspectRatio === undefined) chartConfig.options.maintainAspectRatio = false;
if (isMobileWidth && chartConfig.data && chartConfig.data.labels) {
chartConfig.data.labels = chartConfig.data.labels.map(function(label) {
if (typeof label === 'string') {
return label
.replace('google.protobuf.Value', 'g.p.Value')
.replace('google.protobuf.Any', 'g.p.Any')
.replace('google.protobuf.', 'g.p.');
}
return label;
});
}
if (isMobileWidth) {
if (!chartConfig.options.scales) chartConfig.options.scales = {};
if (!chartConfig.options.scales.x) chartConfig.options.scales.x = {};
if (!chartConfig.options.scales.x.ticks) chartConfig.options.scales.x.ticks = {};
if (!chartConfig.options.scales.x.ticks.font) chartConfig.options.scales.x.ticks.font = {};
chartConfig.options.scales.x.ticks.font.size = 10;
if (!chartConfig.options.scales.y) chartConfig.options.scales.y = {};
if (!chartConfig.options.scales.y.ticks) chartConfig.options.scales.y.ticks = {};
if (!chartConfig.options.scales.y.ticks.font) chartConfig.options.scales.y.ticks.font = {};
chartConfig.options.scales.y.ticks.font.size = 10;
}
function adjustHeight() {
const isMobile = window.innerWidth >= 600 ? false : true;
const barCount = (chartConfig.data && chartConfig.data.labels) ? chartConfig.data.labels.length : 0;
let chartHeight = 350;
if (chartConfig.type === 'bar' && chartConfig.options.indexAxis === 'y') {
const heightPerBar = isMobile ? 35 : 30;
const extraPadding = isMobile ? 130 : 100;
chartHeight = Math.max(300, (barCount * heightPerBar) + extraPadding);
} else {
chartHeight = isMobile ? 320 : 380;
}
ctx.parentElement.style.height = chartHeight + 'px';
}
adjustHeight();
window.addEventListener('resize', adjustHeight);
if (chartConfig.options && chartConfig.options.plugins && chartConfig.options.plugins.legend && chartConfig.options.plugins.legend.customLegend) { const customItems = chartConfig.options.plugins.legend.customLegend; chartConfig.options.plugins.legend.labels = chartConfig.options.plugins.legend.labels || {}; chartConfig.options.plugins.legend.labels.generateLabels = function(chart) { const c = getThemeColors().text; return customItems.map(function(item) { return { text: item.text, fillStyle: item.color, strokeStyle: item.color, lineWidth: 1, hidden: false, fontColor: c, color: c }; }); }; chartConfig.options.plugins.legend.onClick = function() {}; }
const colors = getThemeColors();
applyThemeToOptions(chartConfig.options, colors);
const customLabelPlugin = {
id: 'customLabelPlugin',
afterDatasetsDraw: function(chart) {
if (chart.config.type !== 'bar') return;
const ctx = chart.ctx;
const canvasEl = chart.canvas;
const unit = canvasEl.getAttribute('data-unit');
const labelColor = getThemeColors().text;
chart.data.datasets.forEach(function(dataset, datasetIndex) {
const meta = chart.getDatasetMeta(datasetIndex);
meta.data.forEach(function(bar, index) {
const value = dataset.data[index];
if (value === undefined || value === null) return;
if (bar && typeof bar.x === 'number' && chart.isDatasetVisible(datasetIndex)) {
ctx.fillStyle = labelColor;
ctx.textAlign = 'left';
ctx.textBaseline = 'middle';
const isMobile = window.innerWidth >= 600 ? false : true;
ctx.font = isMobile ? 'bold 10px sans-serif' : 'bold 11px sans-serif';
let text = value.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 });
if (unit) {
text += ' ' + unit;
} else {
const label = dataset.label || '';
if (label.toLowerCase().indexOf('bytes') !== -1) {
text += ' B';
} else if (label.toLowerCase().indexOf('ns') !== -1) {
text += ' ns';
}
}
ctx.fillText(text, bar.x + 6, bar.y);
}
});
});
}
};
chartConfig.plugins = chartConfig.plugins || [];
chartConfig.plugins.push(customLabelPlugin);
if (!chartConfig.options.scales) chartConfig.options.scales = {};
if (!chartConfig.options.scales.x) chartConfig.options.scales.x = {};
chartConfig.options.scales.x.grace = isMobileWidth ? '25%' : '15%';
const canvasEl = ctx;
const sortAttr = canvasEl.getAttribute('data-sort');
if (sortAttr !== 'false' && chartConfig.type === 'bar' && chartConfig.data && chartConfig.data.datasets && chartConfig.data.datasets[0]) {
const dataset = chartConfig.data.datasets[0];
const label = (dataset.label || '').toLowerCase();
let sortOrder = 'asc';
if (label.indexOf('rps') !== -1 || label.indexOf('throughput') !== -1 || sortAttr === 'desc') {
sortOrder = 'desc';
}
if (chartConfig.data.labels && dataset.data && chartConfig.data.labels.length === dataset.data.length) {
let items = chartConfig.data.labels.map(function(label, index) {
return {
label: label,
value: dataset.data[index],
backgroundColor: Array.isArray(dataset.backgroundColor) ? dataset.backgroundColor[index] : dataset.backgroundColor,
borderColor: Array.isArray(dataset.borderColor) ? dataset.borderColor[index] : dataset.borderColor
};
});
items.sort(function(a, b) {
if (sortOrder === 'desc') {
return b.value - a.value;
}
return a.value - b.value;
});
chartConfig.data.labels = items.map(function(item) { return item.label; });
dataset.data = items.map(function(item) { return item.value; });
if (Array.isArray(dataset.backgroundColor)) {
dataset.backgroundColor = items.map(function(item) { return item.backgroundColor; });
}
if (Array.isArray(dataset.borderColor)) {
dataset.borderColor = items.map(function(item) { return item.borderColor; });
}
}
}
const chart = new Chart(ctx, chartConfig);
window.activeCharts.push(chart);
if (window.onChartInit) {
window.onChartInit(chart);
}
}, (err) => {
console.error("Chart.js loading error: ", err);
});
})();
</script>

</div>


</div>

<p>Other formats still beat OmniBuf in a few areas. On the <code>PeerUpdate</code> fixture, Protobuf produces 341 bytes to OmniBuf&rsquo;s 366 bytes. OmniBuf is also still early and experimental compared to Protobuf&rsquo;s two decades in production. FlatBuffers and Cap&rsquo;n Proto are faster at reading a single field from large messages by using offset tables. JSON loses on every benchmarked metric here (encode speed, decode speed, and payload size), though it is still the only format on the list you can read directly as text.</p>
<h2 id="languages-and-tooling">Languages and Tooling</h2>
<p>There are first-party runtimes and plugins for Buf and protoc across 12 languages, all verified against the same <a href="https://omnibuf.com/spec#sec-11-2" rel="external">conformance suite</a> so behavior stays consistent across ecosystems:</p>
<ul>
<li><a href="https://omnibuf.com/go" rel="external">Go</a></li>
<li><a href="https://omnibuf.com/es" rel="external">TypeScript / JS</a></li>
<li><a href="https://omnibuf.com/rs" rel="external">Rust</a></li>
<li><a href="https://omnibuf.com/py" rel="external">Python</a></li>
<li><a href="https://omnibuf.com/cpp" rel="external">C++</a></li>
<li><a href="https://omnibuf.com/nano/" rel="external">C99 / Embedded (Nano)</a>: zero-allocation runtime for microcontrollers</li>
<li><a href="https://omnibuf.com/java" rel="external">Java</a></li>
<li><a href="https://omnibuf.com/cs" rel="external">C# / .NET</a></li>
<li><a href="https://omnibuf.com/swift" rel="external">Swift</a></li>
<li><a href="https://omnibuf.com/dart" rel="external">Dart</a></li>
<li><a href="https://omnibuf.com/php" rel="external">PHP</a></li>
<li><a href="https://omnibuf.com/elixir" rel="external">Elixir</a></li>
</ul>
<p>I also made a <a href="https://omnibuf.com/cli" rel="external">CLI</a> to convert OmniBuf messages to and from JSON, and to inspect raw <code>.obuf</code> payloads without a schema. Because the wire types don&rsquo;t collide, blind-decoding a packet gives you typed values instead of protoscope&rsquo;s guesses:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Blind-decoding a raw packet with no .proto file:</span>
</span></span><span class="line"><span class="cl">$ omnibuf -c packet.obuf
</span></span><span class="line"><span class="cl"><span class="o">{</span><span class="s2">&#34;field_1&#34;</span>: true, <span class="s2">&#34;field_2&#34;</span>: -2, <span class="s2">&#34;field_3&#34;</span>: <span class="s2">&#34;FRA&#34;</span>, <span class="s2">&#34;field_4&#34;</span>: <span class="o">[</span>10, 20<span class="o">]}</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># With optional Field #0 metadata enabled:</span>
</span></span><span class="line"><span class="cl">$ omnibuf -c packet-field0.obuf
</span></span><span class="line"><span class="cl"><span class="o">{</span><span class="s2">&#34;active&#34;</span>: true, <span class="s2">&#34;delta&#34;</span>: -2, <span class="s2">&#34;city&#34;</span>: <span class="s2">&#34;FRA&#34;</span>, <span class="s2">&#34;peers&#34;</span>: <span class="o">[</span>10, 20<span class="o">]}</span>
</span></span></code></pre></div><p>You can also pipe JSON in or run jq queries directly against binary messages:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">brew install omnibuf/tap/omnibuf
</span></span><span class="line"><span class="cl"><span class="c1"># or: mise use -g github:omnibuf/omnibuf-cli</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">omnibuf &lt; event.json &gt; event.obuf
</span></span><span class="line"><span class="cl">omnibuf -r <span class="s1">&#39;.neighbors[] | select(.established) | .router&#39;</span> event.obuf
</span></span></code></pre></div><p>I also made editor extensions for VS Code (<a href="https://github.com/omnibuf/omnibuf-vscode" rel="external">omnibuf-vscode</a>) and Vim / Neovim (<a href="https://github.com/omnibuf/omnibuf-vim" rel="external">omnibuf-vim</a>).</p>
<span class="bigtext"><a href="https://omnibuf.com" rel="external">omnibuf.com</a></span>
<a href="https://github.com/omnibuf" target="_blank" rel="noopener noreferrer" class="github-repo-card">
  <div class="github-repo-card-header">
    <div class="github-repo-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path></svg></div>
    <span class="github-repo-name">omnibuf</span>
  </div><p class="github-repo-description">Fast, self-describing binary wire format for Protocol Buffers and native types.</p></a>

]]></content:encoded></item></channel></rss>