🪷 Lotus

A elegant and modern systems programming language

Install Lotus

Multiple installation methods are available. Choose the one that works best for your system.

There are plans to implement native installers for more distributions and platforms in the near future!

📦 Arch Linux / AUR

The easiest way to install on Arch Linux:

Using an AUR Helper (yay, paru, etc.)

yay -S lotus-lang

Manual AUR Installation

git clone https://aur.archlinux.org/lotus-lang.git
cd lotus-lang
makepkg -si

Visit the AUR Package Page

🔨 From Source

Build Lotus from source using Go 1.20 or later:

Prerequisites

Build Steps

git clone https://github.com/j-alexander3375/Lotus.git
cd Lotus
go build -o lotus ./src

Installation

# Optionally copy to a system path
sudo cp lotus /usr/local/bin/

# Or add current directory to PATH
export PATH=$PATH:$(pwd)

Verify Installation

lotus --version

🐧 Linux (Generic)

For other Linux distributions, build from source:

Install Dependencies

Debian/Ubuntu:

sudo apt install golang-go llvm-dev gcc git

Fedora/RHEL:

sudo dnf install golang llvm-devel gcc git

openSUSE:

sudo zypper install go llvm-devel gcc git

Then follow the "Build Steps" above.

🍎 macOS

Install Lotus on macOS using Homebrew or from source:

Via Homebrew (when available)

brew tap j-alexander3375/lotus
brew install lotus-lang

From Source

# Install dependencies
brew install go llvm gcc

# Clone and build
git clone https://github.com/j-alexander3375/Lotus.git
cd Lotus
go build -o lotus ./src

# Install
sudo cp lotus /usr/local/bin/

🪟 Windows

Lotus can be built on Windows using WSL2 or MSYS2:

Using WSL2 (Recommended)

Install Windows Subsystem for Linux 2 and use the Linux instructions above.

Using MSYS2

pacman -S mingw-w64-x86_64-go mingw-w64-x86_64-llvm mingw-w64-x86_64-gcc git
git clone https://github.com/j-alexander3375/Lotus.git
cd Lotus
go build -o lotus.exe ./src

✅ Verify Installation

Test your installation:

Check Version

lotus --version

Run a Simple Program

Create hello.lts:

use "io";

fn int main() {
    println("Hello from Lotus!");
    ret 0;
}

Compile and run:

lotus -run hello.lts

You should see: Hello from Lotus!

🆘 Troubleshooting

Command not found: lotus

Make sure the lotus binary is in your PATH:

which lotus
# or
type lotus

If not found, add the directory containing lotus to your PATH or use the full path to the binary.

GCC not found

Install GCC for your system:

# Linux
sudo apt install gcc  # Debian/Ubuntu
sudo dnf install gcc  # Fedora

# macOS
brew install gcc

Go not found

Install Go 1.20 or later from golang.org

Permission denied when installing

Use sudo when copying to system paths:

sudo cp lotus /usr/local/bin/

📚 Next Steps