Skip to content

auralangco/aurac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Aura compiler (aurac)

GitHub stars GitHub release License

aurac is the official compiler for the Aura programming language, a functional, parallelizable, and multitarget language. The current version targets the C programming language, with plans to extend support to JavaScript and other languages in the future.

Table of Contents

Features

  • Functional Language: Emphasizes immutability and functional programming paradigms.
  • Parallelizable: Designed to run efficiently on multicore processors.
  • Multitarget: Initially targets C, with plans for JavaScript and more.
  • Type Safety: Ensures operations are validated during compile time.
  • Compile-Time and Runtime Operations: Allows compile-time operations to be available at runtime while enforcing proper compile-time treatment.

Getting Started

To get started with aurac, clone the repository and follow the instructions below to set up and use the compiler.

Prerequisites

  • Rust (required to build the compiler)

  • Cargo (required to build the compiler)

  • A C compiler (required to compile the generated C code)

Installation

  1. Clone the repository:

    git clone https://github.com/auralangco/aurac.git
    cd aurac
  2. Build the project:

    cargo build

Example Code

Here is a simple example of Aura code from the Aura repository:

Function to add two numbers

fn add(a Int, b Int) -> Int = a + b;

Main function

main {
    result = add(5, 7);
    println("The result is ${result}");
}

This example demonstrates a basic function definition and usage in Aura, showcasing the language's syntax and functional programming style.

Future Plans

  • Front-End Development: Create a frontend to compile Aura code properly into C.

  • Compiler Wrapper: Develop a wrapper for gcc/clang/mingw to compile the generated C code into an executable.

  • C Interoperability: Facilitate easy interoperability with C native code.

  • Additional Targets: Add support for JavaScript and C for Windows.

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request. Here’s how you can help:

  1. Fork the repository.

    git clone https://github.com/auralangco/aurac.git
  2. Create a new branch.

    git checkout -b feature-branch
  3. Make your changes and commit them.

    git commit -am 'Add new feature'
  4. Push to the branch.

    git push origin feature-branch
  5. Create a new Pull Request.

  • You can also contribute by opening an issue to report a bug or request a new feature.

License

This project is licensed under the Apache-2.0 License. See the LICENSE file for more details.

Contact