TauriKit.Sidecar.Loopback
0.12.0
See the version list below for details.
dotnet add package TauriKit.Sidecar.Loopback --version 0.12.0
NuGet\Install-Package TauriKit.Sidecar.Loopback -Version 0.12.0
<PackageReference Include="TauriKit.Sidecar.Loopback" Version="0.12.0" />
<PackageVersion Include="TauriKit.Sidecar.Loopback" Version="0.12.0" />
<PackageReference Include="TauriKit.Sidecar.Loopback" />
paket add TauriKit.Sidecar.Loopback --version 0.12.0
#r "nuget: TauriKit.Sidecar.Loopback, 0.12.0"
#:package TauriKit.Sidecar.Loopback@0.12.0
#addin nuget:?package=TauriKit.Sidecar.Loopback&version=0.12.0
#tool nuget:?package=TauriKit.Sidecar.Loopback&version=0.12.0
TauriKit.Sidecar.Loopback
The .NET host side of a desktop app's loopback sidecar — the counterpart of the
tauri-kit-sidecar crate's
loopback feature, released under the same version.
The app starts the sidecar with a fresh random token in an environment variable. The sidecar:
- listens on 127.0.0.1 only, on a port the system picks;
- announces that port as a line on standard output, which the app waits for;
- answers only requests carrying the token as
Authorization: Bearer <token>, compared in constant time; - reports an unexpected failure as its exception type and the frames in the app's own code it
passed through, innermost first (
{"fault":{"type","at","frames"}}) — never the message, which can quote the data the request was about.Fault.Ofreads a failure away from any request the same way. On the Rust side,Response::faultreads that answer as aFault.
The variable's name and the line's prefix are the app's, and must match what the Rust side is given.
using TauriKit.Sidecar.Loopback;
var token = LoopbackHost.ReadToken("HELPER_TOKEN");
if (token is null)
{
Console.Error.WriteLine("HELPER_TOKEN (32+ characters) is required");
return 2;
}
var app = LoopbackHost.CreateSlimBuilder(args).Build();
app.UseBearerToken(token);
app.UseFaults(new FaultOptions
{
OwnNamespaces = ["MyCompany."],
StatusFor = e => e is KeyNotFoundException ? StatusCodes.Status404NotFound : null,
});
app.MapGet("/health", () => "ok");
await app.RunAnnouncingAsync("helper ready port=");
return 0;
The library is ahead-of-time compilation compatible: a sidecar published with PublishAot
can use it. Tests can host the same pipeline with CreateSlimBuilder(args) and StartAsync, and
reach it over HttpClient at app.Urls.
License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TauriKit.Sidecar.Loopback:
| Package | Downloads |
|---|---|
|
TauriKit.Sidecar.Loopback.AspNetCore
The ASP.NET Core host of a desktop app's loopback backend: listen on 127.0.0.1 only, announce the port the system picked or publish it in an owner-only discovery file, answer only registered callers (open routes by name), refuse non-loopback Host names, report unexpected failures without their messages, take a request to quit, and quit when the app that started it is gone. Pairs with the tauri-kit-sidecar crate's loopback feature. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.24.0 | 0 | 10/20/2026 |
| 0.23.0 | 104 | 10/19/2026 |
| 0.22.0 | 121 | 10/18/2026 |
| 0.21.0 | 121 | 10/17/2026 |
| 0.20.0 | 98 | 10/17/2026 |
| 0.19.0 | 103 | 10/16/2026 |
| 0.18.0 | 171 | 10/15/2026 |
| 0.17.0 | 102 | 10/15/2026 |
| 0.16.1 | 107 | 10/14/2026 |
| 0.16.0 | 185 | 10/10/2026 |
| 0.15.0 | 135 | 10/10/2026 |
| 0.14.0 | 105 | 10/9/2026 |
| 0.13.0 | 93 | 10/9/2026 |
| 0.12.1 | 89 | 10/8/2026 |
| 0.12.0 | 183 | 10/3/2026 |
| 0.11.0 | 118 | 10/2/2026 |
| 0.10.0 | 120 | 10/1/2026 |
| 0.9.1 | 94 | 10/1/2026 |
| 0.9.0 | 88 | 10/1/2026 |
| 0.8.0 | 92 | 10/1/2026 |