Giter Site home page Giter Site logo

degory / ghul Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 12.62 MB

compiler for the ghūl programming language

Home Page: https://ghul.dev

License: GNU Affero General Public License v3.0

Shell 70.14% Dockerfile 13.87% C# 16.00%
ghul compiler programming-language dotnet dotnet-core

ghul's Introduction

ghūl compiler

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

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.

ghūl logo icon small

Prerequisites

The compiler requires the .NET 8.0 SDK

Target

The compiler produces standard .NET assemblies and packages targeting .NET 8.0

Getting the compiler

There are a few different ways to get the compiler

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

You can manually install the compiler from the ghūl compiler .NET tool package

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 8.0 runtime

Development environment

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

Gotchas

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.