Skip to content

Lightweight Core overview

A worker or small HTTP service does not always need MVC and Kestrel. Cratis.Arc.Core gives you Arc’s command/query pipelines and a lightweight HttpListener host without an ASP.NET Core dependency. Cratis.Arc adds the ASP.NET integration when you need that ecosystem. Neither package requires event sourcing.

  • Model-bound commands and queries, validation, authorization, and result handling.
  • Identity details and tenant context; application authorization and tenant membership still need deliberate configuration.
  • Correlation IDs, dependency injection, and convention-based discovery.
  • GET/POST manual endpoints, static files and SPA fallback, and basic OpenAPI route metadata.

Your application

Cratis.Arc.Core

Command and query pipelines

Optional lightweight HTTP host

Cratis.Arc ASP.NET integration

Optional MongoDB or EF Core integration

Optional Chronicle event sourcing

Persistence integrations do not require Chronicle. Adding an integration can introduce its own dependencies; the Core-only dependency boundary is not a promise about every combined package graph.

CapabilityArc.Core lightweight hostArc with ASP.NET Core
PackageCratis.Arc.CoreCratis.Arc
HTTP serverHttpListenerASP.NET hosting, commonly Kestrel
Request handlingArc’s simplified route/static/fallback handlingASP.NET middleware ecosystem
Manual routingLiteral-path GET/POST helpersASP.NET routing APIs
Static filesBuilt-in support and SPA fallbackASP.NET static-file middleware
MVC/RazorNot includedAvailable through ASP.NET
OpenAPIBasic route metadata in CoreOptional Cratis.Arc.OpenApi or Cratis.Arc.Swagger
Pipelines, validation, identity, tenant contextAvailableAvailable

Core does have request-processing middleware internally; it does not expose ASP.NET’s full middleware pipeline. Native AOT compatibility, startup time, memory usage, deployment size, and throughput depend on discovery, serialization, integrations, and deployment. Validate your actual publish configuration and benchmark your workload rather than treating “lightweight” as an AOT or performance guarantee.

Choose Core for small standalone HTTP services, workers with management endpoints, or learning the pipelines without a web-framework dependency. Choose ASP.NET Core for controllers, Razor, advanced routing, standard authentication middleware, or other ASP.NET libraries. Arc pipelines can participate in other application architectures, but Core does not itself supply a gRPC server or arbitrary protocol implementation.

The builder registers services; activation maps Arc endpoints and schedules listener startup. This bootstrap fragment belongs in a console project’s Program.cs with using Cratis.Arc;:

var builder = ArcApplication.CreateBuilder(args);
builder.AddCratisArc();
var app = builder.Build();
app.UseCratisArc();
await app.RunAsync();

The default listener binds http://+:5001/; the getting-started checkpoint uses an explicit loopback URL. Review anonymous discovery defaults before exposing the host.