IronBlock --- a .NET interpreter for Blockly‑style block programs, reworked for asynchronous execution.
IronBlock allows you to parse and execute Blockly‑style block definitions --- defined as XML --- from within .NET. This fork builds on the original IronBlock by adding support for asynchronous evaluation and modern .NET workloads, making it easier to embed Blockly‑style scripting in ASP.NET, Blazor, serverless or any async‑heavy environment.
It's useful for:
- Running Blockly‑generated logic on the server side.
- Embedding Blockly scripting in .NET backends or desktop apps.
- Allowing client‑side Blockly editing + server‑side execution.
dotnet add package IronBlockAsync- .NET Standard 2.0 or newer
- Async/await support
using IronBlock;
using IronBlock.Blocks;
using System.Threading.Tasks;
async Task RunBlockAsync(string xml)
{
var parser = new Parser();
parser.AddStandardBlocks();
var workspace = parser.Parse(xml);
var result = await workspace.Evaluate();
Console.WriteLine(result);
}public class MyCustomBlock : IBlock
{
public override Task<object> Evaluate(Context context)
{
// Your custom logic
}
}- Added asynchronous execution
- Improved extensibility
- Original project: https://github.com/richorama/IronBlock
Pull requests and issues are welcome.
MIT License.