Pocok.Scripting
0.2.0-alpha.5
Prefix Reserved
See the version list below for details.
dotnet add package Pocok.Scripting --version 0.2.0-alpha.5
NuGet\Install-Package Pocok.Scripting -Version 0.2.0-alpha.5
<PackageReference Include="Pocok.Scripting" Version="0.2.0-alpha.5" />
<PackageVersion Include="Pocok.Scripting" Version="0.2.0-alpha.5" />
<PackageReference Include="Pocok.Scripting" />
paket add Pocok.Scripting --version 0.2.0-alpha.5
#r "nuget: Pocok.Scripting, 0.2.0-alpha.5"
#:package Pocok.Scripting@0.2.0-alpha.5
#addin nuget:?package=Pocok.Scripting&version=0.2.0-alpha.5&prerelease
#tool nuget:?package=Pocok.Scripting&version=0.2.0-alpha.5&prerelease
Pocok.Scripting
Compatibility tier: experimental alpha. This package is an extraction of the reusable scripting boundary from the original application and is not release-eligible yet.
The package provides:
- bounded JavaScript execution through Jint;
- no ambient CLR, filesystem, network, service-provider, or browser access;
- explicitly registered scalar values and delegate capabilities;
- cancellation, timeout, recursion, statement, source-size, and memory limits;
- neutral import parsing using the comment form: // #import Name from Module;
- deterministic transitive module resolution with cycle and missing-module diagnostics;
- an in-memory source for tests and small tools;
- typed result conversion through Pocok.Conversion.
The original application's persistence, domain objects, notifications, UI editor bindings, and product-specific script APIs are deliberately excluded. A host must expose each capability explicitly and remains responsible for authenticating and authorizing that capability.
ScriptRunner is instance-based and safe for concurrent use because each request creates a fresh Jint engine. The runner does not retain script state. Cancellation is propagated; expected script failures are returned as ScriptResult<T>.
Example:
ScriptRunner runner = new();
ScriptExecutionRequest request = new("sum", "add(20, 22);")
{
ExpectResult = true,
Bindings = [ScriptBinding.ForFunction("add", (Func<int, int, int>)((left, right) => left + right))]
};
ScriptResult<int> result = await runner.ExecuteAsync<int>(request);
| 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
- Jint (>= 4.8.0)
- Pocok.Conversion (>= 0.2.0-alpha.5)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Pocok.Scripting:
| Package | Downloads |
|---|---|
|
Pocok.Scripting.CSharp
Killable trusted-local C# script adapter for Pocok.Scripting. |
|
|
Pocok.Scripting.JavaScript
Restricted Jint JavaScript adapter for Pocok.Scripting. |
|
|
Pocok.Scripting.Python
Isolated CPython 3.14 trusted-local adapter for Pocok.Scripting. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-alpha.7 | 69 | 7/20/2026 |
| 0.2.0-alpha.6 | 49 | 7/20/2026 |
| 0.2.0-alpha.5 | 50 | 7/18/2026 |