This is the compiler for the ghūl programming language. It is a self-hosting compiler: the compiler itself is written entirely in ghūl.
The compiler requires the .NET 8.0 SDK
The compiler produces standard .NET assemblies and packages targeting .NET 8.0
There are a few different ways to get the compiler
If you initialize your project using one of the ghūl .NET project templates, the template will add the compiler to your project folder as a local .NET tool - just run dotnet tool restore
to restore it.
If you create a new GitHub repo from the ghūl repository template, then the compiler will be pre-configured as a local .NET tool in your project folder - run dotnet tool restore
to restore it.
The compiler is pre-installed globally in the ghūl development container
You can manually install the compiler from the ghūl compiler .NET tool package
The compiler expects to be driven by MSBuild using a .ghulproj
project file.
See the ghūl test project for
a real-world example, or use one of the project templates to get started.
You'll need some ghūl source files. By convention ghūl source files have the extension .ghul
, and the standard MSBuild targets will include **/*.ghul
when building.
Once you have a project file and some ghūl source files, you can use the normal .NET SDK commands to build, pack, and run your project:
dotnet build
dotnet pack
dotnet run
Applications written in ghūl require the .NET 8.0 runtime
Visual Studio Code will give you rich language support via the ghūl VSCode language extension.
The ghūl language is sufficiently expressive and the compiler is stable enough for the compiler itself to be written in ghūl. However, this is an incomplete compiler for an experimental programming language: there will be compiler bugs!