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
dotnetis available onPATH
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:
install
MakrellSharp.Clirun a small
.mrshfileuse
checkandemit-csharpas needed
A typical contributor workflow looks like this:
build and test the solution
run the CLI from the source tree
inspect emitted C# when you want to understand how a Makrell# form lowers
build a
.dllwhen you want to try the compile-and-load pathoptionally switch to the packaged
makrellsharptool 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.