{"id":16678335,"url":"https://github.com/jeikabu/nng.netcore","last_synced_at":"2026-03-11T14:38:05.984Z","repository":{"id":51123994,"uuid":"147093034","full_name":"jeikabu/nng.NETCore","owner":"jeikabu","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-27T08:18:48.000Z","size":5332,"stargazers_count":42,"open_issues_count":24,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-18T18:31:07.172Z","etag":null,"topics":["csharp","dotnet","nanomsg","nng"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeikabu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-02T14:35:25.000Z","updated_at":"2025-01-09T03:34:25.000Z","dependencies_parsed_at":"2023-01-18T21:46:00.583Z","dependency_job_id":null,"html_url":"https://github.com/jeikabu/nng.NETCore","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/jeikabu/nng.NETCore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeikabu%2Fnng.NETCore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeikabu%2Fnng.NETCore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeikabu%2Fnng.NETCore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeikabu%2Fnng.NETCore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeikabu","download_url":"https://codeload.github.com/jeikabu/nng.NETCore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeikabu%2Fnng.NETCore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278925551,"owners_count":26069709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","nanomsg","nng"],"created_at":"2024-10-12T13:29:02.292Z","updated_at":"2025-10-08T10:13:19.084Z","avatar_url":"https://github.com/jeikabu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nng\u003cspan\u003e.\u003c/span\u003eNET/NETCore\n\n.NET bindings to [NNG](https://github.com/nanomsg/nng):\n\n\u003e NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery. The API frees the programmer from worrying about details like connection management, retries, and other common considerations, so that they can focus on the application instead of the plumbing.\n\n__Status__:\n\nUsing latest [NNG release](https://github.com/nanomsg/nng/releases).\n\n[![NuGet](https://img.shields.io/nuget/vpre/nng.NET.svg?colorB=brightgreen)](https://www.nuget.org/packages/nng.NET)\n[![GithubActions](https://github.com/jeikabu/nng.NETCore/workflows/build/badge.svg)](https://github.com/jeikabu/nng.NETCore/actions?query=workflow%3Abuild)\n[![codecov](https://codecov.io/gh/jeikabu/nng.NETCore/branch/master/graph/badge.svg?token=KZMer5zeMv)](https://codecov.io/gh/jeikabu/nng.NETCore)\n\nFor list of missing APIs/features see [issues (`is:open label:enhancement`)](https://github.com/jeikabu/nng.NETCore/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement).\n\n\n__Goals of nng\u003cspan\u003e.\u003c/span\u003eNET__:\n\n- __Async first__: async/await access to [nng_aio](https://nng.nanomsg.org/man/v1.3.2/nng_aio.5.html) and [nng_ctx](https://nng.nanomsg.org/man/v1.3.2/nng_ctx.5.html)\n- __Native layer__: P/Invoke in separate files/namespace.  Don't like our high-level OO wrapper?  Re-use the pinvoke and make your own.  Also makes cross-platform-friendly pinvoke easier.\n- __Tests as Documentation__: [xUnit](https://xunit.net/) unit/integration tests in \"plain\" C# similar to application code\n- __Modern .NET__: C# 7.3 and using [`dotnet`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet) and targeting .NET Standard and .NET Core/5 from the start\n- __Safety__: Minimal exceptions and `null`, type system avoids many runtime errors at compile time.\n- __Simple__: Shallow class hierarchy (more composition than inheritance), idiomatic C# similar to original native code when reasonable.\n\n## Usage\n\nSupports projects targeting:\n- .NET 5\n- .NET Core App 1.0+\n- .NET Standard 1.5+\n    - [`SuppressUnmanagedCodeSecurity`](https://docs.microsoft.com/en-us/dotnet/api/system.security.suppressunmanagedcodesecurityattribute) is used with .NET Standard 2.0+ for improved PInvoke performance\n\n[Supported platforms](https://github.com/jeikabu/nng.NETCore/tree/master/nng.NETCore/runtimes):\n- Windows Vista or later 32/64-bit (built on Windows Server 2019)\n- macOS/OSX 10.?+ 64-bit (built on 10.15)\n- Linux x86_64, ARM32/armv7l, ARM64/aarch64 (built on Debian 10/Buster)\n\nShould be easy to add others that are supported by both .NET Core/5 and NNG.\n\nAfter installing the package and building, your output folder should have `runtimes/` directory containing native binaries.\n\nUse `NngLoadContext` (or your own [`AssemblyLoadContext`](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.loader.assemblyloadcontext)) to load the appropriate native library and use NNG:  \n```csharp\nvar path = Path.GetDirectoryName(typeof(Program).Assembly.Location);\nvar ctx = new nng.NngLoadContext(path);\nvar factory = nng.NngLoadContext.Init(ctx);\n// Use factory...\n```\n\nSee [`tests/`](https://github.com/jeikabu/nng.NETCore/tree/master/tests) and [`examples/`](https://github.com/jeikabu/nng.NETCore/tree/master/examples) for usage examples.\n\n## Build \u0026 Run\n\nYou should be able to build nng\u003cspan\u003e.\u003c/span\u003eNET for/on any platform supported by [.NET Core/5](https://dotnet.microsoft.com/download):\n\n1. Build: `dotnet build`\n1. Run: `dotnet run` or `dotnet test tests`\n\nYou should be able to build the NNG native shared library for any [platform supported by NNG](https://github.com/nanomsg/nng#supported-platforms).  See `scripts/build_nng.ps1` for details, but in general:\n1. Download/clone [NNG source](https://github.com/nanomsg/nng)\n1. On Windows, create Command Prompt suitable for Visual Studio:\n    - Run __x64__ _Visual Studio Developer Command Prompt_ to create a 64-bit library (or __x86__ for 32-bit)\n    - OR, run `vcvars64.bat` in cmd.exe (or `vcvars32.bat`)\n1. Run:\n    ```\n    mkdir build \u0026\u0026 cd build\n    cmake -DBUILD_SHARED_LIBS=ON ..\n    cmake --build .\n    ```\n1. Copy library to [appropriate directory](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog) (i.e. `nng.NET/runtimes/XXX/native/`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeikabu%2Fnng.netcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeikabu%2Fnng.netcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeikabu%2Fnng.netcore/lists"}