ARE.Core
1.0.1
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
.NET Framework 4.7.1
This package targets .NET Framework 4.7.1. The package is compatible with this framework or higher.
dotnet add package ARE.Core --version 1.0.1
NuGet\Install-Package ARE.Core -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ARE.Core" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ARE.Core" Version="1.0.1" />
<PackageReference Include="ARE.Core" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ARE.Core --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ARE.Core, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ARE.Core@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ARE.Core&version=1.0.1
#tool nuget:?package=ARE.Core&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ARE — Action Rule Event Engine
Zero dependency, cross-platform, lightweight event-rule-action engine.
Game, web, mobile, desktop — one engine, same logic everywhere.
Event ───→ Middleware ───→ Rule Matching ───→ Action Execution
│ │ │
before/after conditions + matchMode settings + context
priority + groups
What Does It Do?
There is a recurring pattern in every project: "When something happens, if certain conditions are met, do these things."
ARE solves this pattern with a single engine:
| Concept | Description | Example |
|---|---|---|
| Event | Something that happened | order.created, player.died, user.login_failed |
| Rule | Which event, which conditions, what to do | "If order exceeds $5000, send VIP email" |
| Condition | Determines whether a rule should execute | total > 5000, zone == "boss", attempts >= 3 |
| Action | The work to be performed | Send email, deal damage, update stock, show UI |
| Middleware | Intercepts the pipeline | Logging, auth checks, audit trails |
| Context | Shared data throughout the flow | Passing data between actions |
Quick Start
C# (.NET)
var engine = new AreEngine();
engine.RegisterAction("send_email", async (ctx, s) =>
{
Console.WriteLine($"Email: {s.Get("template")}");
});
engine.AddRule(
Rule.Create("vip_order")
.On("order.created")
.WhenGreaterThan("total", 5000.0)
.Then("send_email", s => s.Set("template", "vip_welcome"))
);
await engine.FireAsync("order.created", e => e.Set("total", 7500.0));
// → Email: vip_welcome
JavaScript / TypeScript
const { AreEngine, Rule } = require('are-engine-core');
const engine = new AreEngine();
engine.registerAction('send_email', async (ctx, s) => {
console.log('Email:', s.get('template'));
});
engine.addRule(
Rule.create('vip_order')
.on('order.created')
.whenGreaterThan('total', 5000)
.then('send_email', s => s.set('template', 'vip_welcome'))
);
await engine.fire('order.created', e => e.set('total', 7500));
// → Email: vip_welcome
Dart / Flutter
import 'package:are_engine_core/are_engine_core.dart';
final engine = AreEngine();
engine.registerInlineAction('send_email', (ctx, s) async {
print('Email: ${s.get<String>('template')}');
});
engine.addRule(
Rule.create('vip_order')
.on('order.created')
.whenGreaterThan('total', 5000.0)
.then('send_email', (s) => s.set('template', 'vip_welcome')),
);
await engine.fire('order.created', (e) => e.set('total', 7500.0));
// → Email: vip_welcome
Features
- Zero dependency — No external packages required
- Fluent Builder —
Rule.Create().On().When().Then()chaining - MatchMode —
All(AND),Any(OR),None(NOT),ExactlyOne(XOR) - 9 comparison operators — Equal, GreaterThan, Contains, In, and more
- Middleware — Before/after pipeline interception
- Rule groups — Bulk enable/disable
- Priority ordering — Higher priority rules execute first
- Pipeline control —
StopPipeline,SkipRemainingActions - Dynamic management — Add/remove/enable/disable rules at runtime
- Result reporting — Which rules fired, which were skipped and why
- Async — Fully asynchronous pipeline
Repository Structure
| Folder | Description |
|---|---|
ARE.Core |
Core engine — NuGet package (C#) |
are-core |
JavaScript/TypeScript port — npm package |
ARE.Core.Tests |
xUnit tests |
ARE.Examples.Game |
Game scenario example (C#) |
ARE.Examples.WebApi |
E-commerce scenario example (C#) |
ARE.Examples.Desktop |
POS / desktop scenario example (C#) |
are_engine_core |
Dart/Flutter port — pub.dev package |
are-core/examples |
JavaScript examples (Game, E-commerce, Desktop) |
Platform Support
| Platform | Package |
|---|---|
| WinForms / WPF / MAUI | NuGet: ARE.Core |
| ASP.NET Core / Blazor | NuGet: ARE.Core |
| Unity / Godot | NuGet or .dll (netstandard2.1) |
| Node.js / Express | npm: are-engine-core |
| React / Vue / Angular | npm: are-engine-core |
| React Native / Electron | npm: are-engine-core |
| Flutter (iOS / Android / Web) | pub: are_engine_core |
| Dart CLI / Server | pub: are_engine_core |
Installation
C#:
dotnet add package ARE.Core
JavaScript:
npm install are-engine-core
Dart / Flutter:
dependencies:
are_engine_core: ^1.0.0
Documentation
- ARE.Core (C#) — Detailed API & Usage
- are-engine-core (JS/TS) — Detailed API & Usage
- are_engine_core (Dart/Flutter) — Detailed API & Usage
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| .NET Framework | net471 is compatible. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.