Esolang.Processor.Abstractions 2.0.2

dotnet add package Esolang.Processor.Abstractions --version 2.0.2
                    
NuGet\Install-Package Esolang.Processor.Abstractions -Version 2.0.2
                    
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="Esolang.Processor.Abstractions" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Esolang.Processor.Abstractions" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="Esolang.Processor.Abstractions" />
                    
Project file
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 Esolang.Processor.Abstractions --version 2.0.2
                    
#r "nuget: Esolang.Processor.Abstractions, 2.0.2"
                    
#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 Esolang.Processor.Abstractions@2.0.2
                    
#: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=Esolang.Processor.Abstractions&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=Esolang.Processor.Abstractions&version=2.0.2
                    
Install as a Cake Tool

Esolang.Processor.Abstractions

Unified processor abstractions for esolang execution across the Esolang.NET ecosystem.

Installation

dotnet add package Esolang.Processor.Abstractions

Overview

This package provides common interfaces and extension methods for implementing esolang processors (interpreters) based on an event-driven I/O model.

Core Interfaces

IProcessor<TProgram>

Base interface that holds a parsed program.

public interface IProcessor<TProgram> : IProcessor
{
    /// <summary>The parsed program.</summary>
    TProgram Program { get; }
}

IEventProcessor

Execution interface based on a stream of I/O events.

public interface IEventProcessor : IProcessor
{
    /// <summary>
    /// Executes the processor and returns an asynchronous stream of I/O events.
    /// </summary>
    IAsyncEnumerable<IOEvent> RunAsyncEnumerable(CancellationToken cancellationToken = default);
}

IO Events

The IEventProcessor communicates with the outside world through a stream of IOEvent objects.

Event Type Purpose Factory Method
InputCharEvent Requests a single character from the input. IOEvent.InputChar(Action<char> write)
InputIntEvent Requests a single integer from the input. IOEvent.InputInt(Action<int> write)
OutputCharEvent Sends a single character to the output. IOEvent.OutputChar(char output)
OutputIntEvent Sends a single integer to the output. IOEvent.OutputInt(int output)
EndEvent Signals the end of execution and provides an exit code. IOEvent.End(int exitCode)

Extension Methods

To facilitate running processors, common extension methods are provided in separate packages:

  • Esolang.Processor.Extensions.IO: Contains TextProcessorExtensions (for TextReader/TextWriter), StringProcessorExtensions (for string/StringBuilder), and PipeProcessorExtensions (for PipeReader/PipeWriter).
// Example using TextReader/TextWriter
await processor.RunToEndAsync(inputReader, outputWriter, cancellationToken);

// Example using PipeReader/PipeWriter
await processor.RunToEndAsync(inputPipe, outputPipe, cancellationToken);

// Example using string input/output
var result = await processor.RunToStringAsync(input: "your_input", cancellationToken);

Usage Example

Implement IEventProcessor in your processor:

using Esolang.Processor;

public class MyEsolangProcessor : IEventProcessor
{
    public MyProgram Program { get; }

    public async IAsyncEnumerable<IOEvent> RunAsyncEnumerable(CancellationToken cancellationToken = default)
    {
        // Implement the execution logic yielding IOEvents
        yield return IOEvent.OutputChar('H');
        yield return IOEvent.OutputChar('i');
        yield return IOEvent.End(0);
    }
}

Target Framework

  • netstandard2.0 — Compatible with .NET Framework 4.6.1+ and .NET Core 2.0+
  • netstandard2.1 — Compatible with .NET Core 3.0+ and .NET 5+

See Also

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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 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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Esolang.Processor.Abstractions:

Package Downloads
Esolang.Brainfuck.Processor

Package Description

Esolang.Interpreter.Abstractions

Common abstraction interfaces for implementing esolang interpreters, facilitating integration with the unified processor model.

Esolang.Piet.Processor

Execution engine for Piet programs.

Esolang.Funge.Processor

Execution engine for Funge-98 programs.

Esolang.Processor.Extensions.IO

Comprehensive I/O extension methods for IEventProcessor, supporting TextReader/Writer, System.IO.Pipelines, and string-based execution.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 761 6/2/2026
2.0.1 110 6/2/2026
2.0.0 120 6/2/2026
1.0.0 690 5/7/2026