CryptikLemur.RimObs.Library
1.1.9
dotnet add package CryptikLemur.RimObs.Library --version 1.1.9
NuGet\Install-Package CryptikLemur.RimObs.Library -Version 1.1.9
<PackageReference Include="CryptikLemur.RimObs.Library" Version="1.1.9" />
<PackageVersion Include="CryptikLemur.RimObs.Library" Version="1.1.9" />
<PackageReference Include="CryptikLemur.RimObs.Library" />
paket add CryptikLemur.RimObs.Library --version 1.1.9
#r "nuget: CryptikLemur.RimObs.Library, 1.1.9"
#:package CryptikLemur.RimObs.Library@1.1.9
#addin nuget:?package=CryptikLemur.RimObs.Library&version=1.1.9
#tool nuget:?package=CryptikLemur.RimObs.Library&version=1.1.9
RimWorld Observability Collector
A telemetry framework for RimWorld mods. Mod authors register named sections and metrics; an out-of-process collector aggregates the data, serves a dashboard, and can export diagnostic bundles.
For mod authors
Add the library:
dotnet add package CryptikLemur.RimObs.Library
Instrument a tick:
using Cryptiklemur.RimObs.Api;
private static readonly SectionHandle Tick =
Obs.Profile.RegisterSection("tick");
public void Tick() {
using (Obs.Profile.Measure(Tick)) {
// ... your work ...
}
}
Section names are auto-prefixed with your mod's packageId. See the
Quickstart
for the full path from zero to dashboard.
For players
Subscribe to the Workshop item your other mods declare as a dependency. The collector launches automatically with the game and opens the dashboard in your browser. See Installation.
Documentation
- Mod-author quickstart
- Profile API and Metrics API
- Declarative
profiling.xml - Hot-path discipline
- Wire protocol and Local HTTP API
- Architecture
For contributors
The repo deliberately spans three .NET targets because each piece runs in a different host.
| Project | Target | Where it runs |
|---|---|---|
RimObs.Library/ |
net48 | Inside RimWorld's Unity Mono. Patches game code via Harmony. |
RimObs.Wire/ |
netstandard2.0 | Shared MessagePack types. Linked from both Library and Collector. |
RimObs.Collector/ |
net10.0 | Standalone daemon + CLI. Single self-contained binary per RID. |
RimObs.Dashboard/ |
Svelte 5 + Vite | Static SPA. Built once, embedded as resource in Collector.exe. |
Test projects (RimObs.Library.Tests/, RimObs.Collector.Tests/) are
net8.0 xUnit hosts; they exercise the library logic that is
RimWorld-independent.
Root layout
The non-obvious neighbors at the repo root exist because this is both a RimWorld mod and a multi-project .NET solution:
About/-- RimWorld mod metadata (About.xml, Preview.png, loadFolders.xml).Assemblies/-- RimWorld's deploy directory.RimObs.Librarybuilds straight here.RimObs.sln-- single solution so Rider/VS resolveRimObs.Wirefrom both net48 and net10.0 consumers.Makefile+make.ps1-- seemake build,make test,make publish-collector.docs/wiki/-- source for the wiki. Edit here, not on the wiki site; CI mirrors on push tomain.
Quick start
make build # SPA + full solution
make test # xUnit suites
make watch # collector hot-reload at :17654
make publish-collector # self-contained binaries for win/linux/osx
Conventions
- Hot-path discipline for
RimObs.Libraryis mandatory: zero allocation, exception-safe, no locks, noTask/asyncon the steady path. See Hot-path discipline for the full rules. - Wire protocol is MessagePack with per-batch
schema_version. Default port17654for HTTP and UDP in standalone mode; ephemeral when launched from the game. See Wire protocol.
License
MIT. See LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- CryptikLemur.RimObs.Wire (>= 1.1.9)
- Lib.Harmony (>= 2.4.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CryptikLemur.RimObs.Library:
| Package | Downloads |
|---|---|
|
Cosmere.Lightweave
A composable IMGUI framework for RimWorld mods. Provides nodes, layout, theming, typography, navigation, and adapters that bridge nodes into vanilla surfaces (gizmos, ITabs, MainTabs, FloatMenuOptions, ChoiceLetters, tooltips). |
GitHub repositories
This package is not used by any popular GitHub repositories.