Getting started

Choose the API that speaks your language.

The protocols are shared; the installation, lifecycle, and idioms are not. Start with the implementation you will use, then build a small PAIR application you can run locally.

Pick an implementation

These guides are maintained here so the first example tracks each implementation’s current API.

Modern C

NNG

For new C applications. Its modern API, asynchronous foundation, and active development make it the default choice for C.

Start with NNG

Pure Go

mangos

A native Go implementation of the protocols. Use mangos v3 when you want Go’s idioms without a C dependency.

Start with mangos

Legacy C API

libnanomsg

The original C implementation and API. Choose it for existing applications and bindings that depend on libnanomsg.

Start with libnanomsg

Independent Rust binding

nng-rs

A safe, idiomatic Rust wrapper for NNG. It is maintained separately from the NNG core project.

Start with nng-rs

Independent Python binding

pynng

Python bindings for NNG with synchronous, asyncio, and Trio-friendly APIs. It is maintained separately from NNG core.

Start with pynng

The same patterns, different APIs

All three implementations use the Scalability Protocols. Once your two peers can exchange a message, choose the pattern that matches the shape of your system.