[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6614":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},6614,"nng","nanomsg\u002Fnng","nanomsg","nanomsg-next-generation -- light-weight brokerless messaging","https:\u002F\u002Fnng.nanomsg.org",null,"C",4599,558,127,75,0,1,5,21,4,66.84,"MIT License",false,"main",true,[],"2026-06-12 04:00:29","# nng - nanomsg-next-gen\n\n[![Stand With Ukraine](https:\u002F\u002Fraw.githubusercontent.com\u002Fvshymanskyy\u002FStandWithUkraine\u002Fmain\u002Fbadges\u002FStandWithUkraine.svg)](https:\u002F\u002Fstand-with-ukraine.pp.ua)\n[![Linux Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fnanomsg\u002Fnng\u002Flinux.yml?branch=main&logoColor=grey&logo=linux&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Factions)\n[![Windows Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fnanomsg\u002Fnng\u002Fwindows.yml?branch=main&logoColor=grey&logo=data:image\u002Fsvg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0ODc1IDQ4NzUiPjxwYXRoIGZpbGw9ImdyZXkiIGQ9Ik0wIDBoMjMxMXYyMzEwSDB6bTI1NjQgMGgyMzExdjIzMTBIMjU2NHpNMCAyNTY0aDIzMTF2MjMxMUgwem0yNTY0IDBoMjMxMXYyMzExSDI1NjQiLz48L3N2Zz4=&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Factions)\n[![macOS Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fnanomsg\u002Fnng\u002Fdarwin.yml?branch=main&logoColor=grey&logo=apple&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Factions)\n[![FreeBSD Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fnanomsg\u002Fnng\u002Ffreebsd.yml?branch=main&logoColor=grey&logo=freebsd&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Factions)\n[![illumos Status](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fnanomsg\u002Fnng\u002Fomnios.yml?branch=main&logoColor=grey&logo=accuweather&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Factions)\n[![Coverage](https:\u002F\u002Fimg.shields.io\u002Fcodecov\u002Fc\u002Fgithub\u002Fnanomsg\u002Fnng\u002Fbranch\u002Fmain?logo=codecov&logoColor=grey&label=)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Fnanomsg\u002Fnng\u002Ftree\u002Fmain)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F639573728212156478?label=&logo=discord)](https:\u002F\u002Fdiscord.gg\u002FXnac6b9)\n[![Manual](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=&message=docs&logo=mdbook&logoColor=silver&color=blue)](https:\u002F\u002Fnng.nanomsg.org\u002Fref)\n[![AsciiDoc](https:\u002F\u002Fimg.shields.io\u002Fstatic\u002Fv1?label=&message=docs&logo=asciidoctor&logoColor=silver&color=blue)](https:\u002F\u002Fnng.nanomsg.org\u002Fman)\n[![MIT License](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fnanomsg\u002Fnng.svg?logoColor=silver&logo=open-source-initiative&label=&color=blue)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Fblob\u002Fmain\u002FLICENSE.txt)\n[![Latest Pre-Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fnanomsg\u002Fnng.svg?logo=github&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Freleases)\n[![Latest Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fnanomsg\u002Fnng.svg?include_prereleases&logo=github&label=)](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Freleases)\n\nPlease see [here](UKRAINE.md) for an important message for the people of Russia.\n\n> [!NOTE]\n> This is the development branch for NNG.\n> The content here is\n> under development and may not be suitable for production use.\n> Please use the [`stable`](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnng\u002Ftree\u002Fstable) branch\n> for the latest stable release.\n>\n> As a major release, there are some breaking API changes,\n> but a [migration guide](docs\u002Fref\u002Fmigrate\u002Fnng1.md) is\n> available to help with migrating from NNG 1.x.\n\n> [!NOTE]\n> If you are looking for the legacy version of nanomsg, please\n> see the [libnanomsg](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnanomsg) repository.\n\nThis project is a rewrite of the Scalability Protocols\nlibrary known as [nanomsg](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fnanomsg),\nand adds significant new capabilities, while retaining\ncompatibility with the original.\n\nIt may help to think of this as \"nanomsg-next-generation\".\n\n## NNG: Lightweight Messaging Library\n\nNNG, like its predecessors [nanomsg](http:\u002F\u002Fnanomsg.org) (and to some extent\n[ZeroMQ](http:\u002F\u002Fzeromq.org\u002F)), is a lightweight, broker-less library,\noffering a simple API to solve common recurring messaging problems,\nsuch as publish\u002Fsubscribe, RPC-style request\u002Freply, or service discovery.\nThe API frees the programmer from worrying about details like connection\nmanagement, retries, and other common considerations, so that they\ncan focus on the application instead of the plumbing.\n\nNNG is implemented in C, requiring only a relatively modern C compiler (C11) and CMake to build.\nIt can be built as a shared or a static library, and is readily\nembeddable. It is also designed to be easy to port to new platforms\nif your platform is not already supported.\n\n## License\n\nNNG is licensed under a liberal, and commercial friendly, MIT license.\nThe goal to the license is to minimize friction in adoption, use, and\ncontribution.\n\n## Enhancements (Relative to nanomsg)\n\nHere are areas where this project improves on \"nanomsg\":\n\n- _Reliability_\n\n  NNG is designed for production use from the beginning.\n  Every error case is considered, and it is designed to avoid crashing except\n  in cases of gross developer error.\n  (Hopefully we don't have any of these in our own code.)\n\n- _Scalability_\n\n  NNG scales out to engage multiple cores using a bespoke asynchronous I\u002FO\n  framework, using thread pools to spread load without exceeding typical\n  system limits.\n\n- _Maintainability_\n\n  NNG's architecture is designed to be modular and easily grasped by developers\n  unfamiliar with the code base. The code is also well documented.\n\n- _Extensibility_\n\n  Because it avoids ties to file descriptors, and avoids confusing interlocking\n  state machines, it is easier to add new protocols and transports to NNG.\n  This was demonstrated by the addition of new transports such as TLS.\n\n- _Security_\n\n  NNG provides TLS (1.2 and optionally 1.3) enabled transports, offering\n  support for robust and industry standard authentication and encryption.\n  In addition, it is hardened to be resilient against malicious attackers,\n  with special consideration given to use in a hostile Internet.\n\n- _Usability_\n\n  NNG eschews slavish adherence parts of the more complex and less well\n  understood POSIX APIs, while adopting the semantics that are familiar and\n  useful. New APIs are intuitive, and the optional support for separating\n  protocol context and state from sockets makes creating concurrent\n  applications vastly simpler than previously possible.\n\n## Compatibility\n\nThis project offers both wire compatibility and API compatibility,\nso most nanomsg users can begin using NNG right away.\n\nExisting nanomsg and [mangos](https:\u002F\u002Fgithub.com\u002Fnanomsg\u002Fmangos) applications\ncan inter-operate with NNG applications automatically.\n\nThat said, there are some areas where legacy nanomsg still offers\ncapabilities NNG lacks -- specifically enhanced observability with\nstatistics, and tunable prioritization of different destinations\nare missing, but will be added in a future release.\n\nAdditionally, some API capabilities that are useful for foreign\nlanguage bindings are not implemented yet.\n\nSome simple single threaded, synchronous applications may perform better under\nlegacy nanomsg than under NNG. (We believe that these applications are the\nleast commonly deployed, and least interesting from a performance perspective.\nNNG's internal design is slightly less efficient in such scenarios, but it\ngreatly benefits when concurrency or when multiple sockets or network peers\nare involved.)\n\n## Supported Platforms\n\nNNG supports Linux, macOS, Windows, illumos, Solaris,\nFreeBSD, Android, and iOS.\nIt is regularly tested against macOS, Windows, OmniOS, Ubuntu, and FreeBSD.\nMost other POSIX platforms should work out of\nthe box but have not been tested. Very old versions of otherwise supported\nplatforms might not work.\n\nOfficially, NNG only supports operating systems that are supported by\ntheir vendors. For example, Windows versions 8.1 and lower are no longer\nofficially supported, and macOS versions predating Ventura are no longer\nofficially supported. Very old versions of systems may or may not work,\nand we will generally expend no effort trying to make an unsupported system\nfunction.\nWe generally only test relatively recent versions of supported systems.\n\n## Requirements\n\nTo build this project, you will need a C11 compatible compiler and\n[CMake](http:\u002F\u002Fwww.cmake.org) version 3.15 or newer.\n\nWe recommend using the [Ninja](https:\u002F\u002Fninja-build.org) build\nsystem (pass `-G Ninja` to CMake) when you can.\n(And not just because Ninja sounds like \"NNG\" -- it's also\nblindingly fast and has made our lives as developers measurably better.)\n\nIf you want to build with TLS support you will also need a supported\nTLS library. Currently [Mbed TLS](https:\u002F\u002Ftls.mbed.org), [WolfSSL](https:\u002F\u002Fwolfssl.com),\nand [OpenSSL](https:\u002F\u002Fopenssl.org) all enjoy some level support in NNG.\n\nSee the [build instructions](docs\u002FBUILD_TLS.md) for details.\n\n## Quick Start\n\nWith a Linux or UNIX environment:\n\n```sh\n$ mkdir build\n$ cd build\n$ cmake -G Ninja ..\n$ ninja\n$ ninja test\n$ ninja install\n```\n\n## Reference Manual\n\nThe API documentation is currently in transition, as we are converting it from\nAsciidoc to `mdbook`. Most of the content has now been converted, and you can\nsee it at [here](https:\u002F\u002Fnng.nanomsg.org\u002Fref). Part of the conversion includes\na substantial reorganization for improved usability, with major content revisions\nand additions for NNG 2.0.\n\nThe remaining Asciidoc format documentation is in the `docs\u002Fman` subdirectory, and also\n[online](https:\u002F\u002Fnng.nanomsg.org\u002Fman). It will eventually all be converted before 2.0\nis fully released.\n\nYou can also purchase a copy of the\n[**NNG Reference Manual**](http:\u002F\u002Fstaysail.tech\u002Fbooks\u002Fnng_reference\u002Findex.html).\n(It is published in both electronic and printed formats.)\nPurchases of the book help fund continued development of NNG.\n\n## Example Programs\n\nSome demonstration programs have been created to help serve as examples.\nThese are located in the `demo` directory.\n\n## Legacy Compatibility\n\nMigration from `libnanomsg` APIs is fairly straight-forward for most applications.\nA [migration guide](docs\u002Fref\u002Fmigrate\u002Fnanomsg.md) is available to assist.\n\n## Commercial Support\n\nCommercial support for NNG is available.\n\nPlease contact\n[Staysail Systems, Inc.](mailto:info@staysail.tech)\nto inquire further.\n\n## Commercial Sponsors\n\nThe development of NNG has been made possible through the generous\nsponsorship of\n[Capitar IT Group BV](https:\u002F\u002Fwww.capitar.com)\nand\n[Staysail Systems, Inc.](http:\u002F\u002Fstaysail.tech).\n","nng 是一个轻量级的无中间件消息传递库。它使用 C 语言编写，支持多种操作系统如 Linux、Windows 和 macOS 等，并提供了高效的点对点和发布\u002F订阅模式的消息通信能力。nng 的核心功能包括异步 I\u002FO 支持、零拷贝传输以及丰富的传输协议选择，这使得它非常适合构建高性能的分布式系统或微服务架构。此外，由于其简洁的设计和较小的资源占用，nng 也非常适合在嵌入式设备上运行的应用场景。项目采用 MIT 许可证，确保了广泛的适用性和灵活性。",2,"2026-06-11 03:07:54","top_language"]