RuleScript.Core
1.9.0
See the version list below for details.
dotnet add package RuleScript.Core --version 1.9.0
NuGet\Install-Package RuleScript.Core -Version 1.9.0
<PackageReference Include="RuleScript.Core" Version="1.9.0" />
<PackageVersion Include="RuleScript.Core" Version="1.9.0" />
<PackageReference Include="RuleScript.Core" />
paket add RuleScript.Core --version 1.9.0
#r "nuget: RuleScript.Core, 1.9.0"
#:package RuleScript.Core@1.9.0
#addin nuget:?package=RuleScript.Core&version=1.9.0
#tool nuget:?package=RuleScript.Core&version=1.9.0
RuleScript
RuleScript is a lightweight, embeddable .NET 8 scripting engine for rule-oriented workflows, automation, validation, JSON processing, and host-controlled execution.
It provides a lexer, parser, AST, interpreter, built-in functions, user functions, project imports, Host Function integration, runtime diagnostics, and debugger APIs without exposing a full general-purpose programming language.
Installation
Install the stable package from NuGet:
dotnet add package RuleScript.Core --version 1.9.0
Quick Start
using RuleScript.Core.Runtime;
var engine = new RuleScriptEngine();
var context = new RuntimeContext();
context.Set("Name", "Mick");
context.Set("Distance", 519);
engine.Execute("""
var message = "Hello " + Name;
if Distance > 500 then:
result = message + ": NG";
else:
result = message + ": OK";
endif
""", context);
Console.WriteLine(context.Get<string>("result"));
Run a project file:
var engine = new RuleScriptEngine
{
WorkingDirectory = @"C:\rules"
};
var context = engine.ExecuteFile("main"); // Resolves main.rules
Register a Host Function:
engine.RegisterFunction("GetDistance", _ => 519);
var context = engine.Execute("result = GetDistance();");
Documentation
Detailed syntax, Host integration, debugging, analysis, and version-specific behavior are maintained in the RuleScript Wiki.
- Getting Started
- Language Guide
- Built-in Function Reference
- Host Integration
- Debugging and Analysis
- API Reference by Class
- v1.9.0 release notes
- v1.8.0 API reference
- v1.8.0 maintenance notes
- v1.7.0 release notes
Development
The latest stable source is available on main. See the v1.9.0 release notes for strongly typed functions and overload resolution. See the v1.8.0 maintenance notes for unified function symbols, shared source ranges, and reusable document analysis.
dotnet build RuleScript.sln
dotnet test RuleScript.sln
License
RuleScript is licensed under the MIT License.
| Product | Versions 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. |
-
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.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.10.1 | 169 | 7/8/2026 |
| 1.10.0 | 114 | 7/7/2026 |
| 1.10.0-rc1.5 | 66 | 7/7/2026 |
| 1.10.0-rc1.4 | 63 | 7/7/2026 |
| 1.10.0-rc1.3 | 72 | 7/7/2026 |
| 1.10.0-rc1.2 | 61 | 7/7/2026 |
| 1.10.0-rc1.1 | 72 | 7/7/2026 |
| 1.10.0-rc1.0 | 79 | 7/7/2026 |
| 1.9.0 | 100 | 7/6/2026 |
| 1.9.0-rc1.1 | 65 | 7/6/2026 |
| 1.9.0-rc1.0 | 62 | 7/6/2026 |
| 1.8.0 | 103 | 7/6/2026 |
| 1.8.0-preview1.0 | 57 | 7/4/2026 |
| 1.7.0 | 103 | 7/3/2026 |
| 1.7.0-rc1.1 | 70 | 7/3/2026 |
| 1.7.0-rc1.0 | 66 | 7/3/2026 |
| 1.6.0 | 102 | 7/3/2026 |
| 1.6.0-rc1.4 | 59 | 7/3/2026 |
| 1.6.0-rc1.3 | 55 | 7/3/2026 |
| 1.6.0-rc1.2 | 70 | 7/3/2026 |