N0.IrohNet
0.101.13
dotnet add package N0.IrohNet --version 0.101.13
NuGet\Install-Package N0.IrohNet -Version 0.101.13
<PackageReference Include="N0.IrohNet" Version="0.101.13" />
<PackageVersion Include="N0.IrohNet" Version="0.101.13" />
<PackageReference Include="N0.IrohNet" />
paket add N0.IrohNet --version 0.101.13
#r "nuget: N0.IrohNet, 0.101.13"
#:package N0.IrohNet@0.101.13
#addin nuget:?package=N0.IrohNet&version=0.101.13
#tool nuget:?package=N0.IrohNet&version=0.101.13
Iroh.NET
This repository hosts unofficial C# .NET bindings for the iroh library by N0 Inc. The project uses CySharp's csbindgen library to create a shim using iroh's C FFI bindings that can be used directly in .NET code via traditional interop.
How to Use
This repository publishes a series of NuGet packages via GitHub Actions. Simply install N0.IrohNet into your project from NuGet to get started! The instructions below detail how to build these bindings locally on your machine.
Prerequisites
To build Iroh.NET locally, your development environment needs the following tools installed:
Required:
Optional (for targeting other platforms):
Linux
Android
iOS / macOS
Adding the Code to your Project
In your own project's Git repository, run the following command:
git submodule add "https://github.com/IsaMorphic/N0.IrohNet.git" external/N0.IrohNet
Next, run this command to download any recursive dependencies:
git submodule update --init --recursive
Once completed, you may add the .csproj found in external/N0.IrohNet to any of your other MSBuild projects:
<ProjectReference Include="..\external\N0.IrohNet\N0.IrohNet\N0.IrohNet.csproj" />
Compiling
For Local Development (Desktop)
To use these bindings locally in a desktop development environment, the native dependencies must be compiled first. Follow the instructions below for the relevant platform. Only one of these commands need be executed for a given platform depending on the architecture of the development machine.
Windows
# Build for x64 machines
dotnet build N0.IrohNet.NativeAssets.Win32 --framework net10.0 --runtime win-x64
# Build for ARM64 machines
dotnet build N0.IrohNet.NativeAssets.Win32 --framework net10.0 --runtime win-arm64
macOS
# Build for x64 machines
dotnet build N0.IrohNet.NativeAssets.macOS --framework net10.0 --runtime osx-x64
# Build for ARM64 machines
dotnet build N0.IrohNet.NativeAssets.macOS --framework net10.0 --runtime osx-arm64
Linux
# Build for x64 machines
dotnet build N0.IrohNet.NativeAssets.Linux --framework net10.0 --runtime linux-x64
# Build for ARM64 machines
dotnet build N0.IrohNet.NativeAssets.Linux --framework net10.0 --runtime linux-arm64
For Mobile Development (Android)
For native Android builds, one must ensure that cargo-ndk is installed in a Linux-based development machine. WSL works just fine for Windows users. Then, ensure that Android Studio is installed within that environment and add an older NDK version (r29 works just fine). Then run one of the following commands to compile for the architecture of choice.
# Build for x64 devices (emulators)
dotnet build N0.IrohNet.NativeAssets.Android --runtime android-x64
# Build for ARMv7 devices (older phones)
dotnet build N0.IrohNet.NativeAssets.Android --runtime android-arm
# Build for ARM64 devices (newer phones)
dotnet build N0.IrohNet.NativeAssets.Android --runtime android-arm64
Finally, in the Android application project file, include a reference to the Android assets folder as follows. Doing so will ensure that the native iroh-bindgen library is included in the APK.
<ProjectReference Include="..\external\N0.IrohNet\N0.IrohNet.NativeAssets.Android\N0.IrohNet.NativeAssets.Android.csproj" />
For Mobile Development (iOS)
For native iOS builds, ensure that XCode is installed on your macOS build machine, along with the current version of XCode Command-line Tools and the most recent iOS SDK. Then run one of the following commands to compile for the architecture of choice.
# Build for x64 machines (simulator)
dotnet build N0.IrohNet.NativeAssets.iOS --runtime iossimulator-x64
# Build for ARM64 machines (simulator)
dotnet build N0.IrohNet.NativeAssets.iOS --runtime iossimulator-arm64
# Build for ARM64 devices (iPhones & iPads)
dotnet build N0.IrohNet.NativeAssets.iOS --runtime ios-arm64
Finally, in the iOS application project file, include a reference to the iOS assets folder as follows. Doing so will ensure that the native iroh-bindgen library is included in the app bundle.
<ProjectReference Include="..\external\N0.IrohNet\N0.IrohNet.NativeAssets.iOS\N0.IrohNet.NativeAssets.iOS.csproj" />
For Mobile Development (Mac Catalyst)
For native Catalyst builds, ensure that XCode is installed on your macOS build machine, along with the current version of XCode Command-line Tools and the most recent macOS SDK. Then run one of the following commands to compile for the architecture of choice.
# Build for x64 machines
dotnet build N0.IrohNet.NativeAssets.MacCatalyst --runtime maccatalyst-x64
# Build for ARM64 machines
dotnet build N0.IrohNet.NativeAssets.MacCatalyst --runtime maccatalyst-arm64
Finally, in the Catalyst application project file, include a reference to the Catalyst assets folder as follows. Doing so will ensure that the native iroh-bindgen library is included in the app bundle.
<ProjectReference Include="..\external\N0.IrohNet\N0.IrohNet.NativeAssets.MacCatalyst\N0.IrohNet.NativeAssets.MacCatalyst.csproj" />
Updating the Bindings
To update these bindings within your repository, go to the external/N0.IrohNet subdirectory and run:
git pull
Then, run this command in the repository root:
git submodule update --init --recursive
Finally to commit the update to your codebase, run:
git commit -a -m "Update bindings to latest upstream revision"
Contributing
Feel free to open a PR if something needs to be fixed! Thank you!
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-android36.0 is compatible. net10.0-browser was computed. net10.0-ios was computed. net10.0-ios26.0 is compatible. net10.0-maccatalyst was computed. net10.0-maccatalyst26.0 is compatible. net10.0-macos was computed. net10.0-macos26.0 is compatible. net10.0-tvos was computed. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
-
net10.0
- N0.IrohNet.NativeAssets.Linux (>= 0.101.13)
- N0.IrohNet.NativeAssets.macOS (>= 0.101.13)
- N0.IrohNet.NativeAssets.Win32 (>= 0.101.13)
-
net10.0-android36.0
- N0.IrohNet.NativeAssets.Android (>= 0.101.13)
-
net10.0-ios26.0
- N0.IrohNet.NativeAssets.iOS (>= 0.101.13)
-
net10.0-maccatalyst26.0
- N0.IrohNet.NativeAssets.MacCatalyst (>= 0.101.13)
-
net10.0-macos26.0
- N0.IrohNet.NativeAssets.macOS (>= 0.101.13)
-
net10.0-windows7.0
- N0.IrohNet.NativeAssets.Win32 (>= 0.101.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.101.13 | 146 | 8/19/2026 |
| 0.101.12 | 107 | 8/15/2026 |
| 0.101.11 | 115 | 8/10/2026 |
| 0.101.10 | 97 | 8/10/2026 |
| 0.101.9 | 106 | 8/10/2026 |
| 0.101.8 | 103 | 8/9/2026 |
| 0.101.7 | 99 | 8/9/2026 |
| 0.101.5 | 103 | 8/8/2026 |
| 0.101.4 | 105 | 8/8/2026 |
| 0.101.3 | 105 | 8/8/2026 |
| 0.101.2 | 103 | 8/7/2026 |
| 0.101.1 | 104 | 8/7/2026 |
| 0.101.0 | 103 | 8/7/2026 |