Home

Awesome

<p align="center"> <img src="img/logo.svg" alt="Tau Logo" width="80%"> </p> <h1 align="center">A unified language for efficient and expressive code.</h1>

Welcome to Tau, a programming language designed to be simple yet powerful. This repository contains the compiler for Tau, written in C and utilizing LLVM for backend processing.

[!IMPORTANT] The project is in its early stages, and the language is still evolving.

🚀 Features

Syntax

Types

Control Flow

Functions

Expressions

⚙️ Installation

Prerequisites

Building the Compiler

  1. Clone the Repository:

    git clone https://github.com/Baleg00/tau-lang.git
    cd tau-lang
    
  2. Create a Build Directory:

    mkdir build
    cd build
    
  3. Configure the Project:

    cmake ..
    
  4. Build the Project:

    cmake --build .
    
  5. Install:

     cmake --install .
    

    After installation add the folder (where Tau was installed to) to your environment variables.

  6. Verify Installation:

    Verify that Tau was installed correctly by running the following command:

    tauc --version
    

    This should display the installed Tau version.

👏 That's it! You're now ready to start using Tau for your programming projects. If you encounter any problems during installation or have questions, feel free to open an issue.

❤️ Happy coding with Tau!

📦 Usage

Here's how you can create and compile your first Tau program.

  1. Create Source File:

    Create a file called hello.tau and add the following code:

    extern "C" fun printf(fmt: *u8, ...): i32
    
    fun main(): i32 {
      printf("Hello World!")
      
      return 0
    }
    
  2. Compile:

    Compile the Tau source code into an object file.

    tauc --emit-obj hello.tau
    
  3. Link:

    Use a linker to compile the generated object file into an executable.

    gcc -o hello.exe ./hello.tau.obj
    
  4. Run:

    Run the executable! If everything went according to plan, you should see Hello World printed to your screen.

    ./hello.exe
    

🤝 Contributing

If you'd like to contribute to the Tau project, please check out the Contribution Guidelines.

📄 License

This project is licensed under the Apache 2.0 License.

💖 Support

"Buy Me A Coffee"