Installation

Makrell# is documented here as a published .NET tool first. The source-tree workflow still exists for contributors, but it should not be the main user path.

Prerequisites

Before working with Makrell#, make sure you have:

  • a recent .NET SDK installed

  • a shell where dotnet is available on PATH

Install the tool

dotnet tool install --global MakrellSharp.Cli

This gives you the makrellsharp command.

Run a first source file

Save a file as hello.mrsh:

{import System}
{Console.WriteLine "Hello from Makrell#"}

Then run it:

makrellsharp hello.mrsh

Check a file and emit diagnostics:

makrellsharp check hello.mrsh --json

Build and inspect:

makrellsharp build hello.mrsh
makrellsharp emit-csharp hello.mrsh

Use the source checkout for development

If you are working on Makrell# itself, use the source-tree workflow from impl/dotnet/.

From impl/dotnet/:

dotnet build MakrellSharp.sln
dotnet test MakrellSharp.sln

This gives you:

  • the parser and compiler libraries

  • the CLI entry point

  • the current test suite for the .NET implementation

Representative commands

makrellsharp hello.mrsh
makrellsharp check hello.mrsh --json
makrellsharp build hello.mrsh
makrellsharp emit-csharp hello.mrsh
makrellsharp parse-mron sample.mron
makrellsharp parse-mrml sample.mrml

Common workflow

A typical user workflow looks like this:

  1. install MakrellSharp.Cli

  2. run a small .mrsh file

  3. use check and emit-csharp as needed

A typical contributor workflow looks like this:

  1. build and test the solution

  2. run the CLI from the source tree

  3. inspect emitted C# when you want to understand how a Makrell# form lowers

  4. build a .dll when you want to try the compile-and-load path

  5. optionally switch to the packaged makrellsharp tool flow once you want a cleaner command-line experience

For example:

makrellsharp hello.mrsh
makrellsharp emit-csharp hello.mrsh

What is included today

The current .NET implementation includes:

  • MBF parsing

  • MRON and MRML parsers

  • a Makrell# compiler that emits and loads .NET assemblies

  • macro and meta support for the current implemented subset

  • a CLI/tool workflow for running source files, checking diagnostics, building assemblies, and inspecting embedded compile-time metadata

For the current feature slice and examples, continue with Quick Start, Guide, Tooling, and Cookbook.