Skip to content
/ Lucidus Public
generated from github/codespaces-blank

A small compiled low-level statically typed LLVM-Based Programming language.

License

Notifications You must be signed in to change notification settings

amukh1/Lucidus

Repository files navigation

Lucidus

A Statically-Typed compiled programming language.


Contact me for help, because I will respond. Discord: amukh1.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Welcome to the Lucidus wiki!

Installation

From Github:

$ git clone https:/amukh1/Lucidus ./Lucidus
$ cd Lucidus
$ sudo apt install antlr4
$ chmod +x ./compile.sh
$ sudo ./compile.sh

⚠️ LLVM: Make sure to install LLVM first if you do not have it! (./llvm-install.sh)

From APT: (not set up yet)

$ sudo apt install lucy

VSCODE Extention

Extension Link

Or just search up "Lucidus" in the extensions section

Basic Usage

Lets make hello world!

First make a file named test.luci:

dec printf(fmt:char*, ...) -> int;

This block is declaring the printf function. it takes a static parameter "fmt" for format with type char*, and returns an int. During compilation, the c standard libraries are linked with your code so the definition of printf is provided.

dec main() -> int;
def main() -> int {
    
}

As you can see a big difference here over other common languages is that you declare before you define functions.

Now for the hello world part: (In the main function)

printf("Hello World!");
return 0;

Now lets run it.

$ lucy test.luci test.ll

This compiles test.luci to an llvm ll file. Now to run it, we can use lli:

$ lli test.ll

or clang:

$ clang test.ll -o test
$ ./test

Contributing

You can contribute to the project by making a pull request on GitHub.

Credits

Amukh1.

Built With

Authors

  • Amukh1 - Github / amukh1#9613

See also the list of contributors who participated in this project.

License

GNU License © Amukh1

About

A small compiled low-level statically typed LLVM-Based Programming language.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published