Terp.Akka
0.2.0
dotnet add package Terp.Akka --version 0.2.0
NuGet\Install-Package Terp.Akka -Version 0.2.0
<PackageReference Include="Terp.Akka" Version="0.2.0" />
<PackageVersion Include="Terp.Akka" Version="0.2.0" />
<PackageReference Include="Terp.Akka" />
paket add Terp.Akka --version 0.2.0
#r "nuget: Terp.Akka, 0.2.0"
#:package Terp.Akka@0.2.0
#addin nuget:?package=Terp.Akka&version=0.2.0
#tool nuget:?package=Terp.Akka&version=0.2.0
<div align="center">
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/NoNeedConcept/terp/main/docs/public/readme-header-dark.png"> <img alt="Terp" src="https://raw.githubusercontent.com/NoNeedConcept/terp/main/docs/public/readme-header-light.png"> </picture>
Small foundation libraries for .NET
</div>
A terp is a Frisian dwelling mound: the artificial hill that keeps a home dry and gives it a place to stand. Terp follows the same idea: a small, solid foundation you build your .NET applications on. It stays out of your way.
Terp is a project of NoNeedConcept.
Packages
Both packages share one version and are released together.
| Package | What's inside | Depends on |
|---|---|---|
Terp |
Host setups (ISetup<T>), startup gates, metrics helpers (TimerScope, TerpHttpMetricsHandler), exponential backoff, port finder, async lock, date helpers |
Microsoft.Extensions abstractions only |
Terp.Akka |
Actor system setup (ActorSystemSetup), actor resolving with DI, actor registry, backoff supervisors, context helpers, entity region actor |
Terp + Akka.Hosting |
Terp has no ASP.NET Core reference and no concrete host dependency. It works with any host.
Installation
dotnet add package Terp
dotnet add package Terp.Akka # only if you use Akka.NET
Both packages target .NET 10.
Quick start
One setup class, one startup gate, one host:
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Terp.Hosting;
using Terp.Hosting.Gates;
var builder = Host.CreateApplicationBuilder(args);
builder.Setup(new WarmupSetup());
using var host = builder.Build();
await host.RunAsync();
internal sealed class WarmupSetup : ISetup<IServiceCollection>
{
public void Setup(IServiceCollection services, SetupContext context)
{
services.AddStartupGate("warmup", ct => Task.FromResult(true));
}
}
Gates hold the host back until all dependencies are ready. Open gates are checked with exponential backoff until they return true.
Terp.Akka
One ActorSystemSetup subclass describes the actor system:
internal sealed class MyActorSystem : ActorSystemSetup
{
protected override string ActorSystemName => "my-system";
protected override void BuildSystem(AkkaConfigurationBuilder builder, IServiceProvider serviceProvider) =>
builder.WithActors((system, registry, resolver) =>
registry.Register<GreeterActor>(system.ActorOf(resolver.Props<GreeterActor>(), "greeter")));
}
builder.Setup(new MyActorSystem());
How setups run
- A setup implements
ISetup<TTarget>for each target it configures:IConfigurationManager,ILoggingBuilder,IServiceCollection,IMetricsBuilder,IHostApplicationBuilder, orIHost. - Inside one setup, targets run in a fixed order: configuration, logging, services, metrics, builder.
- Across setups,
builder.Setup(...)runs immediately. Call order is run order. - Dispatch uses pattern matching with no reflection. Trimming and Native AOT work out of the box.
Samples
The demo apps need no external services and exit on their own.
| Project | Shows |
|---|---|
Terp.Example |
TimerScope, TerpHttpMetricsHandler, Backoff, PortFinder, DateTimeExtensions |
Terp.Hosting.Example |
Setups for every target, startup gate, Native AOT publish |
Terp.Akka.Example |
ActorSystemSetup, actor registry, BackoffOnFailure |
dotnet run --project src/Terp.Hosting.Example
Documentation
Full documentation at terp.noneedconcept.org including the getting-started guide, hosting model, and API reference.
Also publishes llms.txt and llms-full.txt for coding assistants.
Contributing
dotnet build src/Terp.slnx
dotnet test --solution Terp.slnx # run from src/
dotnet format Terp.slnx --verify-no-changes
- Commits follow Conventional Commits; commitlint enforces them in CI.
src/Terp.API.Testssnapshots the public API. After an intentional change, review the diff and approve the new snapshot. Breaking changes need afeat!:commit.- See AGENTS.md for code conventions.
License
Terp is released under the MIT 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
- Akka.Cluster.Sharding (>= 1.5.52)
- Akka.Hosting (>= 1.5.52)
- Terp (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.