
Write Piet program once, call it as a C# method.
using Esolang.Piet;
partial class PietSample
{
[GeneratePietMethod("Programs/hello.png")]
public static partial string HelloWorld();
[GeneratePietMethod("Programs/hello.appp", language: LanguageType.PietPlusPlus)]
public static partial string HelloWorldPietPlusPlus();
}
For detailed Generator signatures, patterns, and source specification (including inline sources), see:
| Attribute Argument |
partial Method Parameters (Input) |
partial Method Return Types (Output) |
string (Path/Inline) |
string, TextReader, PipeReader |
void, int, Task<int>, ValueTask<int>, string, Task<string>, ValueTask<string>, IEnumerable<byte>, IAsyncEnumerable<byte> |
| Area |
Status |
| Piet program parsing |
✅ |
| Image processing (codel size) |
✅ |
| Runtime execution |
✅ |
| Piet specific instructions |
✅ |
| Piet++ language support |
✅ |
dotnet add package Esolang.Piet.Generator
dotnet add package Esolang.Piet.Parser
dotnet add package Esolang.Piet.Processor
dotnet tool install -g dotnet-piet
| Want to do |
Package |
| Generate C# methods from Piet/Piet++ at compile time |
Esolang.Piet.Generator |
| Parse source into a Piet program |
Esolang.Piet.Parser |
| Execute Piet/Piet++ in-process |
Esolang.Piet.Processor |
| Run Piet/Piet++ from CLI |
dotnet-piet |
ascii-piet++ text: .appp, .txt2
- With Generator, pass
language: LanguageType.PietPlusPlus when using Piet++ sources.
This project is licensed under the MIT License - see the LICENSE file for details.
| Project |
Target frameworks |
| Esolang.Piet.Generator |
netstandard2.0 |
| Esolang.Piet.Parser |
net8.0, net9.0, net10.0, netstandard2.0, netstandard2.1 |
| Esolang.Piet.Processor |
net8.0, net9.0, net10.0 |
| dotnet-piet |
net10.0 |