ghul.compiler 75.1.0

Prefix Reserved
dotnet tool install --global ghul.compiler --version 75.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local ghul.compiler --version 75.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ghul.compiler&version=75.1.0
                    
nuke :add-package ghul.compiler --version 75.1.0
                    

ghūl compiler

CI/CD NuGet version (ghul.compiler) Release Release Date Issues License Coverage ghūl

This package contains the ghūl programming language compiler packaged as a .NET tool. It is a self-hosting compiler: the compiler itself is written entirely in ghūl.

ghūl logo icon small

Targets

The compiler builds for three targets: .NET 10, WebAssembly and native executables through LLVM.

  • .NET builds standard assemblies and NuGet packages. The compiler is driven by MSBuild from a .ghulproj project file, and needs the .NET 10 SDK, which provides both the runtime the compiler tool runs on and the reference assemblies your projects build against. A ghūl program can use any .NET library. This is the best target for a real project today.
  • WebAssembly builds a WasmGC module and a JavaScript loader. It runs under Node.js, or in a browser that supports WasmGC. It is built with the ghul command-line tool from the ghul-cli repository, from a ghul-project.json manifest, and needs no .NET SDK to build or run on Linux x64 and arm64.
  • Native builds a statically linked executable for Linux on x64 or arm64, linked with ghul-llvm. It is built with ghul and needs no .NET SDK or C compiler.

The WebAssembly and native targets use ghūl's own library, ghul-runtime, in place of the .NET libraries. It is enough to build the compiler itself and to run most of the Rosetta Code solutions, and it doesn't have everything: there are no regular expressions, no HTTP or sockets, no culture-aware formatting, and no decimal, and a program can't call a library that already exists. Native programs can call C with @extern. See WebAssembly and native executables for what each supports.

Prerequisites

For the .NET target, the .NET 10 SDK. For the other two, only the ghul command, which installs as a native executable on Linux x64 and arm64 and as a .NET tool anywhere else, and Node.js to run WebAssembly programs (ghul install node fetches one).

Getting the compiler

There are a few different ways to get the compiler - you might not need to use this package directly.

Use a ghūl .NET project template

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.

Clone the ghūl GitHub repository template

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.

Use the ghūl development container image

The compiler is pre-installed globally in the ghūl development container

Install the compiler as a local or global .NET tool

If none of the above options suits, you can manually install the compiler from this package - see below for details.

Using the compiler

Project file

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.

Source files

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.

Building and running

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

Runtime dependencies for ghūl applications

Applications written in ghūl require the .NET 10 runtime.

Development environment

Visual Studio Code

Visual Studio Code will give you rich language support via the ghūl VSCode language extension.

Dev container

Any container image with the .NET 10 SDK will do. Pin ghul.compiler in your project's local .NET tool manifest and the compiler will be restored automatically when the container starts. A minimal worked example is in this gist.

Basic ghūl language tutorial

For a short ghūl programming language tutorial and reference, see GHUL.md. For more ghūl language details, see the the ghūl programming language website

Manual compiler install

Local tool install

To install the compiler locally in your project folder:

dotnet new tool-manifest # if you don't already have a tool manifest file
dotnet tool install ghul.compiler # install the latest release of the compiler locally
dotnet ghul-compiler # run the compiler

A local tool install means you get a predictable compiler version on every build, provided you check in the tool manifest. It also means you can easily use different versions of the compiler for different projects on the same machine.

Global tool install

To install the compiler globally for the current user:

dotnet tool install --global ghul.compiler # install the latest release of the compiler globally
ghul-compiler # run the compiler

Gotchas

The ghūl language is sufficiently expressive and the compiler is stable enough for the compiler itself to be written in ghūl. Like any compiler it has bugs - issue reports are welcome.

Contributing

Bug reports, language questions, documentation fixes and code are all welcome. See CONTRIBUTING.md for how to build and test the compiler and how to raise a pull request, and SECURITY.md for how to report a suspected vulnerability.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
75.1.0 0 11/19/2026
75.0.8 0 11/19/2026
75.0.7 70 11/17/2026
75.0.6 71 11/17/2026
75.0.5 121 11/17/2026
75.0.4 77 11/17/2026
75.0.3 82 11/17/2026
75.0.2 63 11/17/2026
75.0.1 94 11/17/2026
75.0.0 79 11/17/2026
74.1.1 315 11/17/2026
74.1.0 151 11/17/2026
74.0.0 128 11/17/2026
73.1.12 196 11/17/2026
73.1.11 132 11/17/2026
73.1.10 88 11/17/2026
73.1.9 188 11/17/2026
73.1.8 92 11/17/2026
73.1.7 85 11/17/2026
73.1.6 90 11/17/2026
Loading failed