Muonroi.RuleGen 2.0.0

dotnet tool install --global Muonroi.RuleGen --version 2.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Muonroi.RuleGen --version 2.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Muonroi.RuleGen&version=2.0.0
                    
nuke :add-package Muonroi.RuleGen --version 2.0.0
                    

muonroi-building-block

Muonroi Building Block is the .NET foundation of the Muonroi open-core ecosystem: rule engine, decision tables, governance, tenancy, observability, and the commercial extensions that sit on top of the OSS base.

CI codecov OSS License Commercial License

Install

dotnet add package Muonroi.RuleEngine.Core
dotnet add package Muonroi.RuleEngine.SourceGenerators

Quick Example

Annotate rule logic in normal C#:

[MExtractAsRule("HIGH_VALUE_ORDER", DependsOn = new[] { "CREDIT_SCORE" })]
public RuleResult HighValue(OrderContext context, FactBag facts)
{
    if (context.Amount <= 1000m) return RuleResult.Failure("Below threshold.");
    facts["requiresReview"] = true;
    return RuleResult.Success();
}

Generate the registration and wire the engine:

muonroi-rule extract --source src/Rules --output Generated/Rules
muonroi-rule register --rules Generated/Rules --output Generated/RuleEngineRegistrationExtensions.g.cs
using Muonroi.RuleEngine.Generated;

builder.Services.AddRuleEngine<OrderContext>();
builder.Services.AddGeneratedRules();

Result: the rule enters the DI graph without a handwritten registration block, and muonroi-rule verify can catch dependency and rule-code mistakes before runtime.

Package Families

Area OSS packages Commercial packages
Core Muonroi.Core.Abstractions, Muonroi.Core, Muonroi.Logging, Muonroi.Logging.Abstractions -
Governance Muonroi.Governance.Abstractions, Muonroi.Governance Muonroi.Governance.Enterprise
Rule engine Muonroi.RuleEngine.Abstractions, Muonroi.RuleEngine.Core, Muonroi.RuleEngine.SourceGenerators, Muonroi.RuleEngine.DecisionTable, Muonroi.RuleEngine.Testing Muonroi.RuleEngine.Runtime.Web, Muonroi.RuleEngine.DecisionTable.Web, Muonroi.RuleEngine.CEP, Muonroi.UiEngine.Catalog
Infrastructure Muonroi.AspNetCore, Muonroi.Tenancy, Muonroi.Observability, Muonroi.Data.* Muonroi.Caching.Redis, Muonroi.SignalR, Muonroi.Bff, Muonroi.AuthZ, more

The boundary rule remains simple:

  • OSS packages must not reference commercial packages.
  • Commercial packages may reference OSS packages.

See OSS-BOUNDARY.md for the detailed matrix.

What To Read First

Samples

Local Development

dotnet restore Muonroi.BuildingBlock.sln
dotnet build Muonroi.BuildingBlock.sln -c Debug

Useful gates before opening a PR:

pwsh ./scripts/check-modular-boundaries.ps1 -RepoRoot .
dotnet test Muonroi.BuildingBlock.sln -c Debug

Community

Discussion templates are prepared under .github/DISCUSSION_TEMPLATE and become active as soon as GitHub Discussions is enabled for the repository.

License

OSS packages are Apache 2.0. Commercial packages are distributed under the Muonroi commercial license and require activation proof in deployed environments.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.0.0 118 5/2/2026