# I wrote a small MPMC channel implementation and it turned out pretty well

**URL:** <https://ziggit.dev/t/i-wrote-a-small-mpmc-channel-implementation-and-it-turned-out-pretty-well/14154>\
**Category:** Showcase\
**Created:** [February 1, 2026, 8:35am UTC](https://ziggit.dev/t/i-wrote-a-small-mpmc-channel-implementation-and-it-turned-out-pretty-well/14154 "2026-02-01T08:35:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nubskr](https://ziggit.dev/user_avatar/ziggit.dev/nubskr/32/7765_2.png) [@nubskr](https://ziggit.dev/u/nubskr)\
**Post date:** [February 1, 2026, 8:35am UTC](https://ziggit.dev/t/i-wrote-a-small-mpmc-channel-implementation-and-it-turned-out-pretty-well/14154/1 "2026-02-01T08:35:02Z")

</div>

hi, I have an extensive rust background and was exploring zig, noticed it didn’t have an channel implementation for inter thread communication so I built it.

the core is relatively lean (\< 200 LOC) and the performance is comparable to the golden standard (crossbeam) for the most part

[![r/Zig - I wrote a small MPMC channel implementation and it turned out pretty well|750xauto](https://ziggit.dev/uploads/default/original/2X/a/a893658583839e75b0125b02dcc6bb6a30ae62f0.png)](https://preview.redd.it/i-wrote-a-small-mpmc-channel-implementation-and-it-turned-v0-6feg93lj7ugg1.png?width=1500&format=png&auto=webp&s=52a852fc86c72e1a947e2f6f1403ab689e6e86c4 "Image from r/Zig - I wrote a small MPMC channel implementation and it turned out pretty well")

it uses the LMAX Disruptor pattern (sequence based)

code: [https://github.com/nubskr/ziggy](https://github.com/nubskr/ziggy)

---

<div class="post-metadata">

**Author:** ![Sze](https://ziggit.dev/user_avatar/ziggit.dev/sze/32/496_2.png) [@Sze](https://ziggit.dev/u/Sze)\
**Post date:** [February 1, 2026, 12:39pm UTC](https://ziggit.dev/t/i-wrote-a-small-mpmc-channel-implementation-and-it-turned-out-pretty-well/14154/2 "2026-02-01T12:39:12Z")

</div>

Might make sense to choose another name, there already is another project called ziggy:

> [@Ziggy: a JSON / YAML / TOML replacement](https://ziggit.dev/t/ziggy-a-json-yaml-toml-replacement/3313):
>
> I started working on this project because I need a frontmatter data format for Zine, my static site generator, but I’m trying to make it a general purpose data format that should be an improvement over JSON & co for most similar use cases. Key features: distinction between structs vs maps unions of structs, so that you don’t have to rely on shape matching I have already created a tree sitter grammar, an LSP and a bunch of parsers for it. There’s one last feature (custom string literals) tha…
