A C# library for the Rust+ companion API. Query and control your server, render security cameras, listen for FCM notifications, and acquire all the required credentials natively — no Node.js required.
| Package | Downloads | Description |
|---|---|---|
RustPlusApi |
Core client. Typed Response<T> API for info/time/map/markers, team & clan chat, nexus auth, entities (smart switch / alarm / storage monitor), and the camera protocol. |
|
RustPlusApi.Fcm |
FCM listener — receives server/entity pairing and alarm notifications. | |
RustPlusApi.Fcm.Registration |
Native credential acquisition (GCM/Firebase/FCM/Expo + Steam login + Rust Companion). Replaces the rustplus.js Node CLI. |
|
RustPlusApi.Camera |
Camera sessions (CameraController: keep-alive, turret/PTZ helpers, device-kind checks) and frame rendering via ImageSharp. |
|
RustPlusApi.Extensions.DependencyInjection |
DI registration (AddRustPlus, IRustPlusFactory) for the core client. |
|
RustPlusApi.Fcm.Extensions.DependencyInjection |
DI registration (AddRustPlusFcm, IRustPlusFcmFactory) for the FCM listener. |
Targets .NET Standard 2.0 and .NET 10 — usable from .NET Framework 4.6.2+, .NET 6/7/8/9/10, Mono, and Unity.
dotnet add package RustPlusApi
dotnet add package RustPlusApi.Fcm
dotnet add package RustPlusApi.Fcm.Registration # native credentials (optional)
dotnet add package RustPlusApi.Camera # camera rendering (optional)1. Get your credentials (once). Run the registration sample — it logs you into Steam, writes
rustplus.config.json, and prints the RustPlus(...) arguments after you pair in game:
dotnet run --project samples/RustPlus.Register.ConsoleAppSee samples/ for the full walkthrough. (You can still use
npx @liamcottle/rustplus.js fcm-register as a fallback.)
Prefer a browser to a terminal? The Rust+ credentials website
is the same registration flow behind a single-page app — no .NET SDK needed. Run it yourself with a
single docker run and no configuration; its README has the command. The app is also built to be
hosted for other people, and if a public instance is ever stood up its address will be added there —
until then, self-hosting is the route.
2. Talk to the server:
using var rustPlus = new RustPlus(new RustPlusConnection(server, port, playerId, playerToken));
await rustPlus.ConnectAsync();
var info = await rustPlus.GetInfoAsync();
Console.WriteLine(info.Data?.Name);3. Listen for notifications:
var listener = new RustPlusFcm(credentials);
listener.OnServerPairing += (_, e) => Console.WriteLine($"Paired: {e.Data?.Ip}");
await listener.ConnectAsync();Full guides and the API reference live on the documentation site
(built with DocFX). Start with Getting Started,
browse the Recipes for common patterns, or check the
Troubleshooting page if something isn't working.
Runnable examples are in samples/.
This project is grandly inspired by liamcottle/rustplus.js.
Special thanks to Versette and Devedse for their work on the RustPlusApi.Fcm socket.
- Author: HandyS11